Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
9efc7c4
SK-2233: add v2, v3 and common modules
saileshwar-skyflow Aug 11, 2025
19dbe0c
SK-2237 Refactored code based on multi-module strategy
skyflow-vivek Aug 14, 2025
e7809d8
SK-2243 Refactor v2 and v3 wrapper code
skyflow-vivek Aug 20, 2025
5dfc0b6
SK-2243 added insert req and res class
skyflow-bharti Aug 21, 2025
a55aed1
SK-2258 error class added
skyflow-bharti Aug 21, 2025
df379b7
SK-2259 Added Immutable Skyflow client for V3
skyflow-vivek Aug 22, 2025
facb699
SK-2259 Immutable skyflow client for V3
skyflow-vivek Aug 25, 2025
46a2c77
SK-2258 implement bulk insert sync and asyncin flowdb
skyflow-bharti Aug 25, 2025
dcd9a4b
SK-2260: test v3 internal release
saileshwar-skyflow Aug 26, 2025
1be74b6
[AUTOMATED] Private Release 2.0.0-beta.2-dev-dcd9a4b
saileshwar-skyflow Aug 26, 2025
06fb6fd
SK-2260: update module pom files.
saileshwar-skyflow Aug 26, 2025
381360a
[AUTOMATED] Private Release 2.0.0-beta.2-dev-06fb6fd
saileshwar-skyflow Aug 26, 2025
6309488
SK-2260: update module pom files
saileshwar-skyflow Aug 26, 2025
ebd85d1
[AUTOMATED] Private Release 2.0.0-beta.2-dev-6309488
saileshwar-skyflow Aug 26, 2025
a2d468f
SK-2258 add summary for bulk insert
skyflow-bharti Aug 26, 2025
dcc691e
SK-2260: update bump version
saileshwar-skyflow Aug 26, 2025
a6b915d
[AUTOMATED] Private Release 2.0.0-beta.2-dev-dcc691e
saileshwar-skyflow Aug 26, 2025
6de4c51
Merge branch 'skyflow-vivek/SK-2259-immutable-skyflow-client-initiali…
skyflow-bharti Aug 26, 2025
c7eaaf9
SK-2260: update bump version
saileshwar-skyflow Aug 26, 2025
07adbb8
[AUTOMATED] Private Release 2.0.0-beta.2-dev-c7eaaf9
saileshwar-skyflow Aug 26, 2025
e7aedd6
SK-2260: testing internal release
saileshwar-skyflow Aug 26, 2025
7a330d6
[AUTOMATED] Private Release 2.0.0-beta.2-dev-e7aedd6
saileshwar-skyflow Aug 26, 2025
8be1b71
SK-2260: testing internal release
saileshwar-skyflow Aug 26, 2025
d7f3021
[AUTOMATED] Private Release 2.0.0-beta.2-dev-8be1b71
saileshwar-skyflow Aug 26, 2025
b6f95ec
SK-2260: testing v3 internal release
saileshwar-skyflow Aug 26, 2025
642625e
[AUTOMATED] Private Release 2.0.0-beta.2-dev-b6f95ec
saileshwar-skyflow Aug 26, 2025
44b5412
SK-2260: test v3 internal release
saileshwar-skyflow Aug 26, 2025
f1b4e2f
[AUTOMATED] Private Release 2.0.0-beta.2-dev-44b5412
saileshwar-skyflow Aug 26, 2025
e307a05
SK-2260: test v3 internal release
saileshwar-skyflow Aug 26, 2025
4362001
[AUTOMATED] Private Release 2.0.0-beta.2-dev-e307a05
saileshwar-skyflow Aug 26, 2025
6db7be9
SK-2260: test v3 internal release
saileshwar-skyflow Aug 26, 2025
828ada1
[AUTOMATED] Private Release 2.0.0-beta.2-dev-6db7be9
saileshwar-skyflow Aug 26, 2025
de89bb5
SK-2260: test v3 internal release
saileshwar-skyflow Aug 26, 2025
8fffde5
[AUTOMATED] Private Release 2.0.0-beta.2-dev-de89bb5
saileshwar-skyflow Aug 26, 2025
89a0c90
SK-2260: testting v3 internal release
saileshwar-skyflow Aug 26, 2025
4a75739
[AUTOMATED] Private Release 2.0.0-beta.2-dev-89a0c90
saileshwar-skyflow Aug 26, 2025
434107b
SK-2260: testing v3 internel release
saileshwar-skyflow Aug 26, 2025
07caf2e
[AUTOMATED] Private Release 2.0.0-beta.2-dev-434107b
saileshwar-skyflow Aug 26, 2025
de3258a
SK-2260: testing v3 internel release
saileshwar-skyflow Aug 26, 2025
7887f03
[AUTOMATED] Private Release 2.0.0-beta.2-dev-de3258a
saileshwar-skyflow Aug 26, 2025
1a80429
SK-2260: testing v3 internel release
saileshwar-skyflow Aug 26, 2025
65eef54
[AUTOMATED] Private Release 2.0.0-beta.2-dev-1a80429
saileshwar-skyflow Aug 26, 2025
1fe0b42
SK-2260: testing v3 internel release
saileshwar-skyflow Aug 26, 2025
54b2ca3
[AUTOMATED] Private Release 2.0.0-beta.2-dev-1fe0b42
saileshwar-skyflow Aug 26, 2025
bbc254c
SK-2260: testing v3 internel release
saileshwar-skyflow Aug 26, 2025
db88b71
[AUTOMATED] Private Release 2.0.0-beta.2-dev-bbc254c
saileshwar-skyflow Aug 26, 2025
27832c4
SK-2260: testing v3 internel release
saileshwar-skyflow Aug 26, 2025
cc9f882
[AUTOMATED] Private Release 2.0.0-beta.2-dev-27832c4
saileshwar-skyflow Aug 26, 2025
358a3b0
SK-2260: testing v3 internel release
saileshwar-skyflow Aug 26, 2025
79243cb
[AUTOMATED] Private Release 2.0.0-beta.2-dev-358a3b0
saileshwar-skyflow Aug 26, 2025
d79888b
SK-2260: add distributionManagement in parent pom
saileshwar-skyflow Aug 26, 2025
99db28c
[AUTOMATED] Private Release 2.0.0-beta.2-dev-d79888b
saileshwar-skyflow Aug 26, 2025
7db56c6
SK-2260: update deploy command
saileshwar-skyflow Aug 26, 2025
b328303
[AUTOMATED] Private Release 2.0.0-beta.2-dev-7db56c6
saileshwar-skyflow Aug 26, 2025
47f21ae
SK-2269 Add logic for configuring batchSize and concurrencyLimit
skyflow-vivek Aug 26, 2025
6f765f6
Merge branch 'skyflow-vivek/SK-2269-add-get-retry-records-util-in-ins…
skyflow-bharti Aug 26, 2025
16be91e
SK-2258 fix default concurrency limit logic
skyflow-bharti Aug 27, 2025
6ae9f35
SK-2258 fixed utils tests
skyflow-bharti Aug 27, 2025
938d163
SK-2269 Add error whitelisting for records to retry
skyflow-vivek Aug 27, 2025
1e92923
SK-2269 Fix return type for getRecordsToRetry
skyflow-vivek Aug 27, 2025
a990dad
SK-2258 fixed utils test and add tokens in response
skyflow-bharti Aug 27, 2025
29a36af
SK-2258 fix the v2 insert test
skyflow-bharti Aug 27, 2025
1deebcc
SK-2258 add release steps
skyflow-bharti Aug 27, 2025
540cf6f
Merge pull request #200 from skyflowapi/bharti/SK-2258-workflow-for-v…
skyflow-bharti Aug 27, 2025
fe5a7ec
[AUTOMATED] Private Release 2.0.0-beta.2-dev-540cf6f
skyflow-bharti Aug 27, 2025
2066a9b
SK-2258 add summary for bulk insert
skyflow-bharti Aug 27, 2025
f5ed4de
[AUTOMATED] Private Release 2.0.0-beta.2-dev-2066a9b
skyflow-bharti Aug 27, 2025
e726d65
Merge branch 'v3-release/25.8.2' into v3-release/25.8.1
skyflow-bharti Aug 27, 2025
4b77013
[AUTOMATED] Private Release 2.0.0-beta.2-dev-e726d65
skyflow-bharti Aug 27, 2025
cc4931c
Merge pull request #201 from skyflowapi/v3-release/25.8.1
skyflow-bharti Aug 27, 2025
4894e62
[AUTOMATED] Private Release 2.0.0-beta.2-dev-cc4931c
skyflow-bharti Aug 27, 2025
9fec211
SK-2258 fix parent pom
skyflow-bharti Aug 27, 2025
d8c5cdb
[AUTOMATED] Private Release 2.0.0-beta.2-dev-9fec211
skyflow-bharti Aug 27, 2025
a0ec6c4
SK-2258 fix error response records
skyflow-bharti Aug 28, 2025
1f972f6
SK-2258 fix error response records
skyflow-bharti Aug 29, 2025
474e83b
SK-2258 add expired log
skyflow-bharti Aug 29, 2025
7750bd2
Merge pull request #202 from skyflowapi/bharti/SK-2258-implement-inse…
skyflow-bharti Aug 29, 2025
eb1a7ae
[AUTOMATED] Private Release 2.0.0-beta.2-dev-7750bd2
skyflow-bharti Aug 29, 2025
86ba02e
SK-2258 synchronized errors
skyflow-bharti Aug 29, 2025
a675ae2
SK-2258 fixed the index
skyflow-bharti Aug 29, 2025
e5d7733
SK-2258 fixed the index
skyflow-bharti Aug 29, 2025
a7b8e55
Merge pull request #203 from skyflowapi/bharti/SK-2258-implement-inse…
skyflow-bharti Aug 29, 2025
a206fde
[AUTOMATED] Private Release 2.0.0-beta.2-dev-a7b8e55
skyflow-bharti Aug 29, 2025
9c94a4f
SK-2276: add unit tests for insert flow for v3
saileshwar-skyflow Aug 29, 2025
c82ec17
SK-2258 fix the error response handling
skyflow-bharti Aug 29, 2025
742a05b
Merge pull request #206 from skyflowapi/bharti/SK-2258-implement-inse…
skyflow-bharti Aug 29, 2025
a014706
[AUTOMATED] Private Release 2.0.0-beta.3-dev-742a05b
skyflow-bharti Aug 29, 2025
859f440
SK-2267 Fix log behaviour for bearer token
skyflow-vivek Aug 29, 2025
b5bb89e
SK-2267 Remove redundant error and info logs from V2 module
skyflow-vivek Aug 29, 2025
ad4ff4f
Merge pull request #207 from skyflowapi/skyflow-vivek/SK-2267-fix-bea…
skyflow-vivek Aug 29, 2025
adb292b
[AUTOMATED] Private Release 2.0.0-beta.3-dev-ad4ff4f
skyflow-vivek Aug 29, 2025
6a4c860
SK-2274 detokenize bulk async and sync method
skyflow-bharti Aug 30, 2025
562928d
Merge pull request #204 from skyflowapi/saileshwar-skyflow/SK-2276-in…
skyflow-bharti Aug 30, 2025
294824d
[AUTOMATED] Private Release 2.0.0-beta.3-dev-562928d
skyflow-bharti Aug 30, 2025
c8fe733
Merge branch 'v3-release/25.8.2' into SK-2274-detokenize-public-inter…
skyflow-bharti Aug 30, 2025
7dc2604
Merge pull request #208 from skyflowapi/SK-2274-detokenize-public-int…
skyflow-bharti Aug 30, 2025
56dc542
[AUTOMATED] Private Release 2.0.0-beta.3-dev-7dc2604
skyflow-bharti Aug 30, 2025
ed65fc2
SK-2274 add retry tokens fn
skyflow-bharti Sep 1, 2025
97cf1f7
SK-2274 return List in RETRUN tokens
skyflow-bharti Sep 1, 2025
21eace5
Merge pull request #209 from skyflowapi/SK-2274-detokenize-public-int…
skyflow-bharti Sep 1, 2025
e2c1a67
[AUTOMATED] Private Release 2.0.0-beta.3-dev-21eace5
skyflow-bharti Sep 1, 2025
218dfeb
SK-2274 return List in RETRUN tokens
skyflow-bharti Sep 1, 2025
95b82f8
Merge pull request #211 from skyflowapi/SK-2274-detokenize-public-int…
skyflow-bharti Sep 1, 2025
fa031c1
[AUTOMATED] Private Release 2.0.0-beta.3-dev-95b82f8
skyflow-bharti Sep 1, 2025
35cb954
SK-2276: update bump version script file to accept module
saileshwar-skyflow Sep 1, 2025
d9631e4
SK-2276: update beta release workflow for v3 release
saileshwar-skyflow Sep 1, 2025
7af620b
SK-2276: update shared build and deploy for v3 sdk
saileshwar-skyflow Sep 1, 2025
b7f937f
SK-2276: revert java setup version to v1
saileshwar-skyflow Sep 1, 2025
f200bf2
SK-2274 add expose in summary
skyflow-bharti Sep 1, 2025
cd2386d
SK-2276: fix bump version script
saileshwar-skyflow Sep 1, 2025
7cbf0ff
[AUTOMATED] Private Release 2.0.0-beta.3-dev-cd2386d
saileshwar-skyflow Sep 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ jobs:
uses: ./.github/workflows/shared-build-and-deploy.yml
with:
ref: ${{ github.ref_name }}
server-id: ossrh
server-id: central
profile: maven-central
tag: 'beta'
module: 'v3'
secrets:
server-username: ${{ secrets.CENTRAL_PUBLISHER_PORTAL_USERNAME }}
server-password: ${{ secrets.CENTRAL_PUBLISHER_PORTAL_PASSWORD }}
gpg-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
skyflow-credentials: ${{ secrets.SKYFLOW_CREDENTIALS }} >> .env
test-expired-token: ${{ secrets.TEST_EXPIRED_TOKEN }} >> .env
test-reusable-token: ${{ secrets.TEST_REUSABLE_TOKEN }} >> .env
test-reusable-token: ${{ secrets.TEST_REUSABLE_TOKEN }} >> .env
9 changes: 5 additions & 4 deletions .github/workflows/internal-release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: Publish package to the JFROG Artifactory
name: Publish v3 module to the JFROG Artifactory
on:
push:
tags-ignore:
- '*.*'
paths-ignore:
- "*.md"
branches:
- release/*
- v3-release/*

jobs:
build-and-deploy:
build-and-deploy-v3:
uses: ./.github/workflows/shared-build-and-deploy.yml
with:
ref: ${{ github.ref_name }}
server-id: central
profile: jfrog
tag: 'internal'
module: 'v3'
secrets:
server-username: ${{ secrets.ARTIFACTORY_USERNAME }}
server-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
gpg-key: ${{ secrets.JFROG_GPG_KEY }}
gpg-passphrase: ${{ secrets.JFROG_GPG_PASSPHRASE }}
skyflow-credentials: ${{ secrets.SKYFLOW_CREDENTIALS }} >> .env
test-expired-token: ${{ secrets.TEST_EXPIRED_TOKEN }} >> .env
test-reusable-token: ${{ secrets.TEST_REUSABLE_TOKEN }} >> .env
test-reusable-token: ${{ secrets.TEST_REUSABLE_TOKEN }} >> .env
22 changes: 17 additions & 5 deletions .github/workflows/shared-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ on:
description: 'Release Tag'
required: true
type: string

module:
description: 'Module to build and publish'
required: false
type: string
default: ''

secrets:
server-username:
required: true
Expand Down Expand Up @@ -54,7 +61,7 @@ jobs:
- name: Set up maven or jfrog repository
uses: actions/setup-java@v1
with:
java-version: "1.8"
java-version: "11"
distribution: "adopt"
server-id: ${{ inputs.server-id }}
server-username: SERVER_USERNAME
Expand Down Expand Up @@ -87,7 +94,7 @@ jobs:
if ${{ inputs.tag == 'internal' }}; then
./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" "$(git rev-parse --short "$GITHUB_SHA")"
else
./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}"
./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" "" "${{ inputs.module }}"
fi

- name: Commit changes
Expand All @@ -99,7 +106,7 @@ jobs:
git checkout ${{ env.branch_name }}
fi

git add pom.xml
git add v3/pom.xml
if [[ "${{ inputs.tag }}" == "internal" ]]; then
git commit -m "[AUTOMATED] Private Release ${{ steps.previoustag.outputs.tag }}-dev-$(git rev-parse --short $GITHUB_SHA)"
git push origin ${{ github.ref_name }} -f
Expand All @@ -125,9 +132,14 @@ jobs:
json: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }}

- name: Publish package
run: mvn --batch-mode deploy -P ${{ inputs.profile }}
run: |
if [[ "${{ inputs.tag }}" == "internal" ]]; then
mvn --batch-mode -pl ${{ inputs.module }} -am deploy -P jfrog
elif [[ "${{ inputs.tag }}" == "beta" || "${{ inputs.tag }}" == "public" ]]; then
mvn --batch-mode -pl ${{ inputs.module }} -am deploy -P ${{ inputs.profile }}
fi

env:
SERVER_USERNAME: ${{ secrets.server-username }}
SERVER_PASSWORD: ${{ secrets.server-password }}
GPG_PASSPHRASE: ${{ secrets.gpg-passphrase }}
GPG_PASSPHRASE: ${{ secrets.gpg-passphrase }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea

target
target

**/dependency-reduced-pom.xml
.env
22 changes: 22 additions & 0 deletions common/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.skyflow</groupId>
<artifactId>skyflow</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>common</artifactId>
<version>1.0.0</version>


<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
48 changes: 48 additions & 0 deletions common/src/main/java/com/skyflow/BaseSkyflow.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.skyflow;

import com.skyflow.config.Credentials;
import com.skyflow.config.VaultConfig;
import com.skyflow.enums.LogLevel;
import com.skyflow.logs.InfoLogs;
import com.skyflow.utils.BaseUtils;
import com.skyflow.utils.logger.LogUtil;

import java.util.LinkedHashMap;

class BaseSkyflow {
private final BaseSkyflowClientBuilder builder;

protected BaseSkyflow(BaseSkyflowClientBuilder builder) {
this.builder = builder;
}

public LogLevel getLogLevel() {
return this.builder.logLevel;
}

public VaultConfig getVaultConfig() {
Object[] array = this.builder.vaultConfigMap.values().toArray();
return (VaultConfig) array[0];
}

static class BaseSkyflowClientBuilder {
protected final LinkedHashMap<String, VaultConfig> vaultConfigMap;
protected Credentials skyflowCredentials;
protected LogLevel logLevel;

protected BaseSkyflowClientBuilder() {
this.vaultConfigMap = new LinkedHashMap<>();
this.skyflowCredentials = null;
this.logLevel = LogLevel.ERROR;
}

public BaseSkyflowClientBuilder setLogLevel(LogLevel logLevel) {
this.logLevel = logLevel == null ? LogLevel.ERROR : logLevel;
LogUtil.setupLogger(this.logLevel);
LogUtil.printInfoLog(BaseUtils.parameterizedString(
InfoLogs.CURRENT_LOG_LEVEL.getLog(), String.valueOf(logLevel)
));
return this;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.ArrayList;

public class Credentials {
public class Credentials implements Cloneable {
private String path;
private ArrayList<String> roles;
private String context;
Expand Down Expand Up @@ -63,4 +63,13 @@ public String getApiKey() {
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}

@Override
public Object clone() throws CloneNotSupportedException {
Credentials cloned = (Credentials) super.clone();
if (this.roles != null) {
cloned.roles = new ArrayList<>(this.roles);
}
return cloned;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.skyflow.enums.Env;

public class VaultConfig {
public class VaultConfig implements Cloneable {
private String vaultId;
private String clusterId;
private Env env;
Expand Down Expand Up @@ -46,4 +46,13 @@ public Credentials getCredentials() {
public void setCredentials(Credentials credentials) {
this.credentials = credentials;
}

@Override
public Object clone() throws CloneNotSupportedException {
VaultConfig cloned = (VaultConfig) super.clone();
if (this.credentials != null) {
cloned.credentials = (Credentials) this.credentials.clone();
}
return cloned;
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.skyflow.errors;

import com.skyflow.utils.Constants;
import com.skyflow.utils.SdkVersion;

public enum ErrorMessage {
// Client initialization
VaultIdAlreadyInConfigList("%s0 Validation error. VaultId is present in an existing config. Specify a new vaultId in config."),
VaultIdNotInConfigList("%s0 Validation error. VaultId is missing from the config. Specify the vaultIds from configs."),
OnlySingleVaultConfigAllowed("%s0 Validation error. A vault config already exists. Cannot add another vault config."),
ConnectionIdAlreadyInConfigList("%s0 Validation error. ConnectionId is present in an existing config. Specify a connectionId in config."),
ConnectionIdNotInConfigList("%s0 Validation error. ConnectionId is missing from the config. Specify the connectionIds from configs."),
EmptyCredentials("%s0 Validation error. Invalid credentials. Credentials must not be empty."),
Expand Down Expand Up @@ -51,6 +52,7 @@ public enum ErrorMessage {
JwtDecodeError("%s0 Validation error. Invalid access token. Verify your credentials."),
MissingAccessToken("%s0 Validation error. Access token not present in the response from bearer token generation. Verify your credentials."),
MissingTokenType("%s0 Validation error. Token type not present in the response from bearer token generation. Verify your credentials."),
BearerTokenExpired("%s0 Validation error. Bearer token is invalid or expired. Please provide a valid bearer token."),

// Insert
TableKeyError("%s0 Validation error. 'table' key is missing from the payload. Specify a 'table' key."),
Expand Down Expand Up @@ -145,15 +147,24 @@ public enum ErrorMessage {
FailedToDecodeFileFromResponse("%s0 Failed to decode the file from the response. Ensure the response is valid and try again."),
EmptyFileAndFilePathInDeIdentifyFile("%s0 Validation error. Both file and filePath are empty. Specify either file object or filePath, not both."),
PollingForResultsFailed("%s0 API error. Polling for results failed. Unable to retrieve the deidentified file"),
FailedtoSaveProcessedFile("%s0 Validation error. Failed to save the processed file. Ensure the output directory is valid and writable."),
FailedToSaveProcessedFile("%s0 Validation error. Failed to save the processed file. Ensure the output directory is valid and writable."),
InvalidAudioFileType("%s0 Validation error. The file type is not supported. Specify a valid file type mp3 or wav."),
// Generic
ErrorOccurred("%s0 API error. Error occurred.")
ErrorOccurred("%s0 API error. Error occurred."),

DetokenizeRequestNull("%s0 Validation error. DetokenizeRequest object is null. Specify a valid DetokenizeRequest object."),

NullTokenGroupRedactions("%s0 Validation error. TokenGroupRedaction in the list is null. Specify a valid TokenGroupRedactions object."),

NullRedactionInTokenGroup("%s0 Validation error. Redaction in TokenGroupRedactions is null or empty. Specify a valid redaction."),

NullTokenGroupNameInTokenGroup("%s0 Validation error. TokenGroupName in TokenGroupRedactions is null or empty. Specify a valid tokenGroupName."),
;
;
private final String message;

ErrorMessage(String message) {
this.message = message.replace("%s0", Constants.SDK_PREFIX);
this.message = message.replace("%s0", SdkVersion.getSdkPrefix());
}

public String getMessage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.skyflow.utils.Constants;
import com.skyflow.utils.BaseConstants;

import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -70,7 +70,7 @@ public String getRequestId() {
}

private void setRequestId(Map<String, List<String>> responseHeaders) {
List<String> ids = responseHeaders.get(Constants.REQUEST_ID_HEADER_KEY);
List<String> ids = responseHeaders.get(BaseConstants.REQUEST_ID_HEADER_KEY);
this.requestId = ids == null ? null : ids.get(0);
}

Expand Down Expand Up @@ -99,7 +99,7 @@ public JsonArray getDetails() {

private void setDetails(Map<String, List<String>> responseHeaders) {
JsonElement detailsElement = ((JsonObject) responseBody.get("error")).get("details");
List<String> errorFromClientHeader = responseHeaders.get(Constants.ERROR_FROM_CLIENT_HEADER_KEY);
List<String> errorFromClientHeader = responseHeaders.get(BaseConstants.ERROR_FROM_CLIENT_HEADER_KEY);
if (detailsElement != null) {
this.details = detailsElement.getAsJsonArray();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.skyflow.generated.auth.rest;

import com.skyflow.generated.auth.rest.core.ClientOptions;
import com.skyflow.generated.auth.rest.core.Suppliers;
import com.skyflow.generated.auth.rest.resources.authentication.AuthenticationClient;
import java.util.function.Supplier;

public class ApiClient {
protected final ClientOptions clientOptions;

protected final Supplier<AuthenticationClient> authenticationClient;

public ApiClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.authenticationClient = Suppliers.memoize(() -> new AuthenticationClient(clientOptions));
}

public AuthenticationClient authentication() {
return this.authenticationClient.get();
}

public static ApiClientBuilder builder() {
return new ApiClientBuilder();
}
}
Loading