From 66522cb8ab30f986fc1c3f620d1fa248b2db5524 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 27 Jul 2026 18:19:48 +0000
Subject: [PATCH 1/2] [fern-generated] Update SDK
Generated by Fern
CLI Version: unknown
Generators:
- fernapi/fern-java-sdk: 4.11.1
---
.fern/metadata.json | 6 +-
build.gradle | 4 +-
reference.md | 303 ++++++++++++++
.../com/schematic/api/AsyncBaseSchematic.java | 8 +
.../com/schematic/api/core/ClientOptions.java | 4 +-
.../accounts/AsyncRawAccountsClient.java | 8 +
.../resources/accounts/RawAccountsClient.java | 8 +
.../requests/CountAccountMembersRequest.java | 40 +-
.../requests/ListAccountMembersRequest.java | 40 +-
.../types/CountAccountMembersParams.java | 40 +-
.../types/ListAccountMembersParams.java | 40 +-
.../licenses/AsyncLicensesClient.java | 74 ++++
.../licenses/AsyncRawLicensesClient.java | 386 ++++++++++++++++++
.../resources/licenses/LicensesClient.java | 70 ++++
.../resources/licenses/RawLicensesClient.java | 306 ++++++++++++++
.../requests/CountLicensesRequest.java | 227 ++++++++++
.../requests/ListLicensesRequest.java | 227 ++++++++++
.../licenses/types/CountLicensesParams.java | 216 ++++++++++
.../licenses/types/CountLicensesResponse.java | 152 +++++++
.../types/GetSingleLicenseResponse.java | 181 ++++++++
.../licenses/types/ListLicensesParams.java | 216 ++++++++++
.../licenses/types/ListLicensesResponse.java | 174 ++++++++
.../AsyncPlanmigrationsClient.java | 11 +
.../AsyncRawPlanmigrationsClient.java | 107 +++++
.../planmigrations/PlanmigrationsClient.java | 11 +
.../RawPlanmigrationsClient.java | 82 ++++
.../requests/PreviewMigrationRequestBody.java | 216 ++++++++++
.../types/PreviewMigrationResponse.java | 183 +++++++++
.../BillingCreditGrantZeroedOutReason.java | 11 +
.../api/types/FeatureDetailResponseData.java | 139 ++++++-
.../api/types/FeatureInPlanResponseData.java | 94 ++++-
.../api/types/FeatureResponseData.java | 94 ++++-
.../com/schematic/api/types/FeatureType.java | 10 +
.../com/schematic/api/types/FeatureView.java | 64 +++
.../api/types/LicenseResponseData.java | 193 +++++++++
...onMigrationPreviewCompanyResponseData.java | 273 +++++++++++++
...anVersionMigrationPreviewResponseData.java | 118 ++++++
37 files changed, 4311 insertions(+), 25 deletions(-)
create mode 100644 src/main/java/com/schematic/api/resources/licenses/AsyncLicensesClient.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/AsyncRawLicensesClient.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/LicensesClient.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/RawLicensesClient.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/requests/CountLicensesRequest.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/requests/ListLicensesRequest.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/types/CountLicensesParams.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/types/CountLicensesResponse.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/types/GetSingleLicenseResponse.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/types/ListLicensesParams.java
create mode 100644 src/main/java/com/schematic/api/resources/licenses/types/ListLicensesResponse.java
create mode 100644 src/main/java/com/schematic/api/resources/planmigrations/requests/PreviewMigrationRequestBody.java
create mode 100644 src/main/java/com/schematic/api/resources/planmigrations/types/PreviewMigrationResponse.java
create mode 100644 src/main/java/com/schematic/api/types/LicenseResponseData.java
create mode 100644 src/main/java/com/schematic/api/types/PlanVersionMigrationPreviewCompanyResponseData.java
create mode 100644 src/main/java/com/schematic/api/types/PlanVersionMigrationPreviewResponseData.java
diff --git a/.fern/metadata.json b/.fern/metadata.json
index 68b76a32..5ee5cee3 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -14,10 +14,10 @@
"implementation redis.clients:jedis:5.2.0"
]
},
- "originGitCommit": "75191b40ce7af084ca4fb11f623ab59c57cf97e3",
+ "originGitCommit": "340529eacf4f1dcc5522e771872c1dd94b9c4891",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
- "requestedVersion": "1.5.2",
+ "requestedVersion": "1.5.3",
"ciProvider": "github",
- "sdkVersion": "1.5.2"
+ "sdkVersion": "1.5.3"
}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 1307bd8f..a292004d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -62,7 +62,7 @@ java {
group = 'com.schematichq'
-version = '1.5.2'
+version = '1.5.3'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -93,7 +93,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.schematichq'
artifactId = 'schematic-java'
- version = '1.5.2'
+ version = '1.5.3'
from components.java
pom {
name = 'Schematic'
diff --git a/reference.md b/reference.md
index 2d2fd29f..d28f526b 100644
--- a/reference.md
+++ b/reference.md
@@ -45,6 +45,7 @@ client.accounts().listAccountMembers(
Arrays.asList("ids")
)
.q("q")
+ .role(AccountMemberRole.ADMIN)
.limit(1000000L)
.offset(1000000L)
.build()
@@ -79,6 +80,14 @@ client.accounts().listAccountMembers(
-
+**role:** `Optional` — Filter by member role
+
+
+
+
+
+-
+
**limit:** `Optional` — Page limit (default 100)
@@ -159,6 +168,7 @@ client.accounts().countAccountMembers(
Arrays.asList("ids")
)
.q("q")
+ .role(AccountMemberRole.ADMIN)
.limit(1000000L)
.offset(1000000L)
.build()
@@ -193,6 +203,14 @@ client.accounts().countAccountMembers(
-
+**role:** `Optional` — Filter by member role
+
+
+
+
+
+-
+
**limit:** `Optional` — Page limit (default 100)
@@ -17547,6 +17565,217 @@ client.integrationsapi().uninstallIntegration("integration_id");
+
+
+
+
+## licenses
+client.licenses.listLicenses() -> ListLicensesResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.licenses().listLicenses(
+ ListLicensesRequest
+ .builder()
+ .featureIds(
+ Arrays.asList("feature_ids")
+ )
+ .ids(
+ Arrays.asList("ids")
+ )
+ .name("name")
+ .limit(1000000L)
+ .offset(1000000L)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**featureIds:** `Optional`
+
+
+
+
+
+-
+
+**ids:** `Optional`
+
+
+
+
+
+-
+
+**name:** `Optional`
+
+
+
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
+
+
+
+
+
+
+
+
+
+
+
+client.licenses.getSingleLicense(licenseId) -> GetSingleLicenseResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.licenses().getSingleLicense("license_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**licenseId:** `String` — license_id
+
+
+
+
+
+
+
+
+
+
+
+client.licenses.countLicenses() -> CountLicensesResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.licenses().countLicenses(
+ CountLicensesRequest
+ .builder()
+ .featureIds(
+ Arrays.asList("feature_ids")
+ )
+ .ids(
+ Arrays.asList("ids")
+ )
+ .name("name")
+ .limit(1000000L)
+ .offset(1000000L)
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**featureIds:** `Optional`
+
+
+
+
+
+-
+
+**ids:** `Optional`
+
+
+
+
+
+-
+
+**name:** `Optional`
+
+
+
+
+
+-
+
+**limit:** `Optional` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `Optional` — Page offset (default 0)
+
+
+
+
+
+
+
@@ -18882,6 +19111,80 @@ client.planmigrations().countMigrations(
+
+
+
+
+client.planmigrations.previewMigration(request) -> PreviewMigrationResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.planmigrations().previewMigration(
+ PreviewMigrationRequestBody
+ .builder()
+ .planId("plan_id")
+ .planVersionIdTo("plan_version_id_to")
+ .targetPlanType(PlanType.PLAN)
+ .companyIds(
+ Arrays.asList("company_ids")
+ )
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**companyIds:** `List`
+
+
+
+
+
+-
+
+**planId:** `String`
+
+
+
+
+
+-
+
+**planVersionIdTo:** `String`
+
+
+
+
+
+-
+
+**targetPlanType:** `PlanType`
+
+
+
+
+
+
+
diff --git a/src/main/java/com/schematic/api/AsyncBaseSchematic.java b/src/main/java/com/schematic/api/AsyncBaseSchematic.java
index fada1c1a..7a7774db 100644
--- a/src/main/java/com/schematic/api/AsyncBaseSchematic.java
+++ b/src/main/java/com/schematic/api/AsyncBaseSchematic.java
@@ -21,6 +21,7 @@
import com.schematic.api.resources.features.AsyncFeaturesClient;
import com.schematic.api.resources.insights.AsyncInsightsClient;
import com.schematic.api.resources.integrationsapi.AsyncIntegrationsapiClient;
+import com.schematic.api.resources.licenses.AsyncLicensesClient;
import com.schematic.api.resources.planbundle.AsyncPlanbundleClient;
import com.schematic.api.resources.plangroups.AsyncPlangroupsClient;
import com.schematic.api.resources.planmigrations.AsyncPlanmigrationsClient;
@@ -65,6 +66,8 @@ public class AsyncBaseSchematic {
protected final Supplier integrationsapiClient;
+ protected final Supplier licensesClient;
+
protected final Supplier plangroupsClient;
protected final Supplier planmigrationsClient;
@@ -95,6 +98,7 @@ public AsyncBaseSchematic(ClientOptions clientOptions) {
this.featuresClient = Suppliers.memoize(() -> new AsyncFeaturesClient(clientOptions));
this.insightsClient = Suppliers.memoize(() -> new AsyncInsightsClient(clientOptions));
this.integrationsapiClient = Suppliers.memoize(() -> new AsyncIntegrationsapiClient(clientOptions));
+ this.licensesClient = Suppliers.memoize(() -> new AsyncLicensesClient(clientOptions));
this.plangroupsClient = Suppliers.memoize(() -> new AsyncPlangroupsClient(clientOptions));
this.planmigrationsClient = Suppliers.memoize(() -> new AsyncPlanmigrationsClient(clientOptions));
this.componentspublicClient = Suppliers.memoize(() -> new AsyncComponentspublicClient(clientOptions));
@@ -178,6 +182,10 @@ public AsyncIntegrationsapiClient integrationsapi() {
return this.integrationsapiClient.get();
}
+ public AsyncLicensesClient licenses() {
+ return this.licensesClient.get();
+ }
+
public AsyncPlangroupsClient plangroups() {
return this.plangroupsClient.get();
}
diff --git a/src/main/java/com/schematic/api/core/ClientOptions.java b/src/main/java/com/schematic/api/core/ClientOptions.java
index d48b7c89..d3dc508d 100644
--- a/src/main/java/com/schematic/api/core/ClientOptions.java
+++ b/src/main/java/com/schematic/api/core/ClientOptions.java
@@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.schematichq:schematic-java/1.5.2");
+ put("User-Agent", "com.schematichq:schematic-java/1.5.3");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.schematic.fern:api-sdk");
- put("X-Fern-SDK-Version", "1.5.2");
+ put("X-Fern-SDK-Version", "1.5.3");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
index 1fc9b4d9..a0ed7419 100644
--- a/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/AsyncRawAccountsClient.java
@@ -91,6 +91,10 @@ public CompletableFuture>
if (request.getQ().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
+ if (request.getRole().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "role", request.getRole().get(), false);
+ }
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "limit", request.getLimit().get(), false);
@@ -305,6 +309,10 @@ public CompletableFuture>
if (request.getQ().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
+ if (request.getRole().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "role", request.getRole().get(), false);
+ }
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "limit", request.getLimit().get(), false);
diff --git a/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java b/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
index b91959d6..5f46f468 100644
--- a/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
+++ b/src/main/java/com/schematic/api/resources/accounts/RawAccountsClient.java
@@ -85,6 +85,10 @@ public BaseSchematicHttpResponse listAccountMembers(
if (request.getQ().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
+ if (request.getRole().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "role", request.getRole().get(), false);
+ }
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "limit", request.getLimit().get(), false);
@@ -250,6 +254,10 @@ public BaseSchematicHttpResponse countAccountMember
if (request.getQ().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "q", request.getQ().get(), false);
}
+ if (request.getRole().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "role", request.getRole().get(), false);
+ }
if (request.getLimit().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "limit", request.getLimit().get(), false);
diff --git a/src/main/java/com/schematic/api/resources/accounts/requests/CountAccountMembersRequest.java b/src/main/java/com/schematic/api/resources/accounts/requests/CountAccountMembersRequest.java
index 7b8a6212..e43cac0a 100644
--- a/src/main/java/com/schematic/api/resources/accounts/requests/CountAccountMembersRequest.java
+++ b/src/main/java/com/schematic/api/resources/accounts/requests/CountAccountMembersRequest.java
@@ -12,6 +12,7 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.AccountMemberRole;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -26,6 +27,8 @@ public final class CountAccountMembersRequest {
private final Optional q;
+ private final Optional role;
+
private final Optional limit;
private final Optional offset;
@@ -35,11 +38,13 @@ public final class CountAccountMembersRequest {
private CountAccountMembersRequest(
Optional> ids,
Optional q,
+ Optional role,
Optional limit,
Optional offset,
Map additionalProperties) {
this.ids = ids;
this.q = q;
+ this.role = role;
this.limit = limit;
this.offset = offset;
this.additionalProperties = additionalProperties;
@@ -58,6 +63,14 @@ public Optional getQ() {
return q;
}
+ /**
+ * @return Filter by member role
+ */
+ @JsonProperty("role")
+ public Optional getRole() {
+ return role;
+ }
+
/**
* @return Page limit (default 100)
*/
@@ -86,12 +99,16 @@ public Map getAdditionalProperties() {
}
private boolean equalTo(CountAccountMembersRequest other) {
- return ids.equals(other.ids) && q.equals(other.q) && limit.equals(other.limit) && offset.equals(other.offset);
+ return ids.equals(other.ids)
+ && q.equals(other.q)
+ && role.equals(other.role)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.ids, this.q, this.limit, this.offset);
+ return Objects.hash(this.ids, this.q, this.role, this.limit, this.offset);
}
@java.lang.Override
@@ -109,6 +126,8 @@ public static final class Builder {
private Optional q = Optional.empty();
+ private Optional role = Optional.empty();
+
private Optional limit = Optional.empty();
private Optional offset = Optional.empty();
@@ -121,6 +140,7 @@ private Builder() {}
public Builder from(CountAccountMembersRequest other) {
ids(other.getIds());
q(other.getQ());
+ role(other.getRole());
limit(other.getLimit());
offset(other.getOffset());
return this;
@@ -156,6 +176,20 @@ public Builder q(String q) {
return this;
}
+ /**
+ * Filter by member role
+ */
+ @JsonSetter(value = "role", nulls = Nulls.SKIP)
+ public Builder role(Optional role) {
+ this.role = role;
+ return this;
+ }
+
+ public Builder role(AccountMemberRole role) {
+ this.role = Optional.ofNullable(role);
+ return this;
+ }
+
/**
* Page limit (default 100)
*/
@@ -185,7 +219,7 @@ public Builder offset(Long offset) {
}
public CountAccountMembersRequest build() {
- return new CountAccountMembersRequest(ids, q, limit, offset, additionalProperties);
+ return new CountAccountMembersRequest(ids, q, role, limit, offset, additionalProperties);
}
public Builder additionalProperty(String key, Object value) {
diff --git a/src/main/java/com/schematic/api/resources/accounts/requests/ListAccountMembersRequest.java b/src/main/java/com/schematic/api/resources/accounts/requests/ListAccountMembersRequest.java
index 10a0328f..e17b7512 100644
--- a/src/main/java/com/schematic/api/resources/accounts/requests/ListAccountMembersRequest.java
+++ b/src/main/java/com/schematic/api/resources/accounts/requests/ListAccountMembersRequest.java
@@ -12,6 +12,7 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.AccountMemberRole;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -26,6 +27,8 @@ public final class ListAccountMembersRequest {
private final Optional q;
+ private final Optional role;
+
private final Optional limit;
private final Optional offset;
@@ -35,11 +38,13 @@ public final class ListAccountMembersRequest {
private ListAccountMembersRequest(
Optional> ids,
Optional q,
+ Optional role,
Optional limit,
Optional offset,
Map additionalProperties) {
this.ids = ids;
this.q = q;
+ this.role = role;
this.limit = limit;
this.offset = offset;
this.additionalProperties = additionalProperties;
@@ -58,6 +63,14 @@ public Optional getQ() {
return q;
}
+ /**
+ * @return Filter by member role
+ */
+ @JsonProperty("role")
+ public Optional getRole() {
+ return role;
+ }
+
/**
* @return Page limit (default 100)
*/
@@ -86,12 +99,16 @@ public Map getAdditionalProperties() {
}
private boolean equalTo(ListAccountMembersRequest other) {
- return ids.equals(other.ids) && q.equals(other.q) && limit.equals(other.limit) && offset.equals(other.offset);
+ return ids.equals(other.ids)
+ && q.equals(other.q)
+ && role.equals(other.role)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.ids, this.q, this.limit, this.offset);
+ return Objects.hash(this.ids, this.q, this.role, this.limit, this.offset);
}
@java.lang.Override
@@ -109,6 +126,8 @@ public static final class Builder {
private Optional q = Optional.empty();
+ private Optional role = Optional.empty();
+
private Optional limit = Optional.empty();
private Optional offset = Optional.empty();
@@ -121,6 +140,7 @@ private Builder() {}
public Builder from(ListAccountMembersRequest other) {
ids(other.getIds());
q(other.getQ());
+ role(other.getRole());
limit(other.getLimit());
offset(other.getOffset());
return this;
@@ -156,6 +176,20 @@ public Builder q(String q) {
return this;
}
+ /**
+ * Filter by member role
+ */
+ @JsonSetter(value = "role", nulls = Nulls.SKIP)
+ public Builder role(Optional role) {
+ this.role = role;
+ return this;
+ }
+
+ public Builder role(AccountMemberRole role) {
+ this.role = Optional.ofNullable(role);
+ return this;
+ }
+
/**
* Page limit (default 100)
*/
@@ -185,7 +219,7 @@ public Builder offset(Long offset) {
}
public ListAccountMembersRequest build() {
- return new ListAccountMembersRequest(ids, q, limit, offset, additionalProperties);
+ return new ListAccountMembersRequest(ids, q, role, limit, offset, additionalProperties);
}
public Builder additionalProperty(String key, Object value) {
diff --git a/src/main/java/com/schematic/api/resources/accounts/types/CountAccountMembersParams.java b/src/main/java/com/schematic/api/resources/accounts/types/CountAccountMembersParams.java
index 4981fc50..bddf655a 100644
--- a/src/main/java/com/schematic/api/resources/accounts/types/CountAccountMembersParams.java
+++ b/src/main/java/com/schematic/api/resources/accounts/types/CountAccountMembersParams.java
@@ -12,6 +12,7 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.AccountMemberRole;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -29,6 +30,8 @@ public final class CountAccountMembersParams {
private final Optional q;
+ private final Optional role;
+
private final Map additionalProperties;
private CountAccountMembersParams(
@@ -36,11 +39,13 @@ private CountAccountMembersParams(
Optional limit,
Optional offset,
Optional q,
+ Optional role,
Map additionalProperties) {
this.ids = ids;
this.limit = limit;
this.offset = offset;
this.q = q;
+ this.role = role;
this.additionalProperties = additionalProperties;
}
@@ -73,6 +78,14 @@ public Optional getQ() {
return q;
}
+ /**
+ * @return Filter by member role
+ */
+ @JsonProperty("role")
+ public Optional getRole() {
+ return role;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -85,12 +98,16 @@ public Map getAdditionalProperties() {
}
private boolean equalTo(CountAccountMembersParams other) {
- return ids.equals(other.ids) && limit.equals(other.limit) && offset.equals(other.offset) && q.equals(other.q);
+ return ids.equals(other.ids)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset)
+ && q.equals(other.q)
+ && role.equals(other.role);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.ids, this.limit, this.offset, this.q);
+ return Objects.hash(this.ids, this.limit, this.offset, this.q, this.role);
}
@java.lang.Override
@@ -112,6 +129,8 @@ public static final class Builder {
private Optional q = Optional.empty();
+ private Optional role = Optional.empty();
+
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -122,6 +141,7 @@ public Builder from(CountAccountMembersParams other) {
limit(other.getLimit());
offset(other.getOffset());
q(other.getQ());
+ role(other.getRole());
return this;
}
@@ -178,8 +198,22 @@ public Builder q(String q) {
return this;
}
+ /**
+ * Filter by member role
+ */
+ @JsonSetter(value = "role", nulls = Nulls.SKIP)
+ public Builder role(Optional role) {
+ this.role = role;
+ return this;
+ }
+
+ public Builder role(AccountMemberRole role) {
+ this.role = Optional.ofNullable(role);
+ return this;
+ }
+
public CountAccountMembersParams build() {
- return new CountAccountMembersParams(ids, limit, offset, q, additionalProperties);
+ return new CountAccountMembersParams(ids, limit, offset, q, role, additionalProperties);
}
public Builder additionalProperty(String key, Object value) {
diff --git a/src/main/java/com/schematic/api/resources/accounts/types/ListAccountMembersParams.java b/src/main/java/com/schematic/api/resources/accounts/types/ListAccountMembersParams.java
index 42e47f14..286b24ad 100644
--- a/src/main/java/com/schematic/api/resources/accounts/types/ListAccountMembersParams.java
+++ b/src/main/java/com/schematic/api/resources/accounts/types/ListAccountMembersParams.java
@@ -12,6 +12,7 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.AccountMemberRole;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -29,6 +30,8 @@ public final class ListAccountMembersParams {
private final Optional q;
+ private final Optional role;
+
private final Map additionalProperties;
private ListAccountMembersParams(
@@ -36,11 +39,13 @@ private ListAccountMembersParams(
Optional limit,
Optional offset,
Optional q,
+ Optional role,
Map additionalProperties) {
this.ids = ids;
this.limit = limit;
this.offset = offset;
this.q = q;
+ this.role = role;
this.additionalProperties = additionalProperties;
}
@@ -73,6 +78,14 @@ public Optional getQ() {
return q;
}
+ /**
+ * @return Filter by member role
+ */
+ @JsonProperty("role")
+ public Optional getRole() {
+ return role;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -85,12 +98,16 @@ public Map getAdditionalProperties() {
}
private boolean equalTo(ListAccountMembersParams other) {
- return ids.equals(other.ids) && limit.equals(other.limit) && offset.equals(other.offset) && q.equals(other.q);
+ return ids.equals(other.ids)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset)
+ && q.equals(other.q)
+ && role.equals(other.role);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.ids, this.limit, this.offset, this.q);
+ return Objects.hash(this.ids, this.limit, this.offset, this.q, this.role);
}
@java.lang.Override
@@ -112,6 +129,8 @@ public static final class Builder {
private Optional q = Optional.empty();
+ private Optional role = Optional.empty();
+
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -122,6 +141,7 @@ public Builder from(ListAccountMembersParams other) {
limit(other.getLimit());
offset(other.getOffset());
q(other.getQ());
+ role(other.getRole());
return this;
}
@@ -178,8 +198,22 @@ public Builder q(String q) {
return this;
}
+ /**
+ * Filter by member role
+ */
+ @JsonSetter(value = "role", nulls = Nulls.SKIP)
+ public Builder role(Optional role) {
+ this.role = role;
+ return this;
+ }
+
+ public Builder role(AccountMemberRole role) {
+ this.role = Optional.ofNullable(role);
+ return this;
+ }
+
public ListAccountMembersParams build() {
- return new ListAccountMembersParams(ids, limit, offset, q, additionalProperties);
+ return new ListAccountMembersParams(ids, limit, offset, q, role, additionalProperties);
}
public Builder additionalProperty(String key, Object value) {
diff --git a/src/main/java/com/schematic/api/resources/licenses/AsyncLicensesClient.java b/src/main/java/com/schematic/api/resources/licenses/AsyncLicensesClient.java
new file mode 100644
index 00000000..08a058c4
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/AsyncLicensesClient.java
@@ -0,0 +1,74 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses;
+
+import com.schematic.api.core.ClientOptions;
+import com.schematic.api.core.RequestOptions;
+import com.schematic.api.resources.licenses.requests.CountLicensesRequest;
+import com.schematic.api.resources.licenses.requests.ListLicensesRequest;
+import com.schematic.api.resources.licenses.types.CountLicensesResponse;
+import com.schematic.api.resources.licenses.types.GetSingleLicenseResponse;
+import com.schematic.api.resources.licenses.types.ListLicensesResponse;
+import java.util.concurrent.CompletableFuture;
+
+public class AsyncLicensesClient {
+ protected final ClientOptions clientOptions;
+
+ private final AsyncRawLicensesClient rawClient;
+
+ public AsyncLicensesClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ this.rawClient = new AsyncRawLicensesClient(clientOptions);
+ }
+
+ /**
+ * Get responses with HTTP metadata like headers
+ */
+ public AsyncRawLicensesClient withRawResponse() {
+ return this.rawClient;
+ }
+
+ public CompletableFuture listLicenses() {
+ return this.rawClient.listLicenses().thenApply(response -> response.body());
+ }
+
+ public CompletableFuture listLicenses(RequestOptions requestOptions) {
+ return this.rawClient.listLicenses(requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture listLicenses(ListLicensesRequest request) {
+ return this.rawClient.listLicenses(request).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture listLicenses(
+ ListLicensesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.listLicenses(request, requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture getSingleLicense(String licenseId) {
+ return this.rawClient.getSingleLicense(licenseId).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture getSingleLicense(
+ String licenseId, RequestOptions requestOptions) {
+ return this.rawClient.getSingleLicense(licenseId, requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countLicenses() {
+ return this.rawClient.countLicenses().thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countLicenses(RequestOptions requestOptions) {
+ return this.rawClient.countLicenses(requestOptions).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countLicenses(CountLicensesRequest request) {
+ return this.rawClient.countLicenses(request).thenApply(response -> response.body());
+ }
+
+ public CompletableFuture countLicenses(
+ CountLicensesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.countLicenses(request, requestOptions).thenApply(response -> response.body());
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/AsyncRawLicensesClient.java b/src/main/java/com/schematic/api/resources/licenses/AsyncRawLicensesClient.java
new file mode 100644
index 00000000..6edf0950
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/AsyncRawLicensesClient.java
@@ -0,0 +1,386 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.schematic.api.core.BaseSchematicApiException;
+import com.schematic.api.core.BaseSchematicException;
+import com.schematic.api.core.BaseSchematicHttpResponse;
+import com.schematic.api.core.ClientOptions;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.core.QueryStringMapper;
+import com.schematic.api.core.RequestOptions;
+import com.schematic.api.core.RetryInterceptor;
+import com.schematic.api.errors.BadRequestError;
+import com.schematic.api.errors.ForbiddenError;
+import com.schematic.api.errors.InternalServerError;
+import com.schematic.api.errors.NotFoundError;
+import com.schematic.api.errors.UnauthorizedError;
+import com.schematic.api.resources.licenses.requests.CountLicensesRequest;
+import com.schematic.api.resources.licenses.requests.ListLicensesRequest;
+import com.schematic.api.resources.licenses.types.CountLicensesResponse;
+import com.schematic.api.resources.licenses.types.GetSingleLicenseResponse;
+import com.schematic.api.resources.licenses.types.ListLicensesResponse;
+import com.schematic.api.types.ApiError;
+import java.io.IOException;
+import java.util.concurrent.CompletableFuture;
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.Headers;
+import okhttp3.HttpUrl;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+import org.jetbrains.annotations.NotNull;
+
+public class AsyncRawLicensesClient {
+ protected final ClientOptions clientOptions;
+
+ public AsyncRawLicensesClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ }
+
+ public CompletableFuture> listLicenses() {
+ return listLicenses(ListLicensesRequest.builder().build());
+ }
+
+ public CompletableFuture> listLicenses(
+ RequestOptions requestOptions) {
+ return listLicenses(ListLicensesRequest.builder().build(), requestOptions);
+ }
+
+ public CompletableFuture> listLicenses(
+ ListLicensesRequest request) {
+ return listLicenses(request, null);
+ }
+
+ public CompletableFuture> listLicenses(
+ ListLicensesRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("licenses");
+ if (request.getName().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "name", request.getName().get(), false);
+ }
+ if (request.getLimit().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "limit", request.getLimit().get(), false);
+ }
+ if (request.getOffset().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "offset", request.getOffset().get(), false);
+ }
+ if (request.getFeatureIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "feature_ids", request.getFeatureIds().get(), true);
+ }
+ if (request.getIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "ids", request.getIds().get(), true);
+ }
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ListLicensesResponse.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ public CompletableFuture> getSingleLicense(String licenseId) {
+ return getSingleLicense(licenseId, null);
+ }
+
+ public CompletableFuture> getSingleLicense(
+ String licenseId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("licenses")
+ .addPathSegment(licenseId);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetSingleLicenseResponse.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
+ public CompletableFuture> countLicenses() {
+ return countLicenses(CountLicensesRequest.builder().build());
+ }
+
+ public CompletableFuture> countLicenses(
+ RequestOptions requestOptions) {
+ return countLicenses(CountLicensesRequest.builder().build(), requestOptions);
+ }
+
+ public CompletableFuture> countLicenses(
+ CountLicensesRequest request) {
+ return countLicenses(request, null);
+ }
+
+ public CompletableFuture> countLicenses(
+ CountLicensesRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("licenses/count");
+ if (request.getName().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "name", request.getName().get(), false);
+ }
+ if (request.getLimit().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "limit", request.getLimit().get(), false);
+ }
+ if (request.getOffset().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "offset", request.getOffset().get(), false);
+ }
+ if (request.getFeatureIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "feature_ids", request.getFeatureIds().get(), true);
+ }
+ if (request.getIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "ids", request.getIds().get(), true);
+ }
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CountLicensesResponse.class),
+ response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ future.completeExceptionally(new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 401:
+ future.completeExceptionally(new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ case 500:
+ future.completeExceptionally(new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (JsonProcessingException e) {
+ future.completeExceptionally(
+ new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e));
+ } catch (IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new BaseSchematicException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/LicensesClient.java b/src/main/java/com/schematic/api/resources/licenses/LicensesClient.java
new file mode 100644
index 00000000..180a9083
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/LicensesClient.java
@@ -0,0 +1,70 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses;
+
+import com.schematic.api.core.ClientOptions;
+import com.schematic.api.core.RequestOptions;
+import com.schematic.api.resources.licenses.requests.CountLicensesRequest;
+import com.schematic.api.resources.licenses.requests.ListLicensesRequest;
+import com.schematic.api.resources.licenses.types.CountLicensesResponse;
+import com.schematic.api.resources.licenses.types.GetSingleLicenseResponse;
+import com.schematic.api.resources.licenses.types.ListLicensesResponse;
+
+public class LicensesClient {
+ protected final ClientOptions clientOptions;
+
+ private final RawLicensesClient rawClient;
+
+ public LicensesClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ this.rawClient = new RawLicensesClient(clientOptions);
+ }
+
+ /**
+ * Get responses with HTTP metadata like headers
+ */
+ public RawLicensesClient withRawResponse() {
+ return this.rawClient;
+ }
+
+ public ListLicensesResponse listLicenses() {
+ return this.rawClient.listLicenses().body();
+ }
+
+ public ListLicensesResponse listLicenses(RequestOptions requestOptions) {
+ return this.rawClient.listLicenses(requestOptions).body();
+ }
+
+ public ListLicensesResponse listLicenses(ListLicensesRequest request) {
+ return this.rawClient.listLicenses(request).body();
+ }
+
+ public ListLicensesResponse listLicenses(ListLicensesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.listLicenses(request, requestOptions).body();
+ }
+
+ public GetSingleLicenseResponse getSingleLicense(String licenseId) {
+ return this.rawClient.getSingleLicense(licenseId).body();
+ }
+
+ public GetSingleLicenseResponse getSingleLicense(String licenseId, RequestOptions requestOptions) {
+ return this.rawClient.getSingleLicense(licenseId, requestOptions).body();
+ }
+
+ public CountLicensesResponse countLicenses() {
+ return this.rawClient.countLicenses().body();
+ }
+
+ public CountLicensesResponse countLicenses(RequestOptions requestOptions) {
+ return this.rawClient.countLicenses(requestOptions).body();
+ }
+
+ public CountLicensesResponse countLicenses(CountLicensesRequest request) {
+ return this.rawClient.countLicenses(request).body();
+ }
+
+ public CountLicensesResponse countLicenses(CountLicensesRequest request, RequestOptions requestOptions) {
+ return this.rawClient.countLicenses(request, requestOptions).body();
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/RawLicensesClient.java b/src/main/java/com/schematic/api/resources/licenses/RawLicensesClient.java
new file mode 100644
index 00000000..03ab6d26
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/RawLicensesClient.java
@@ -0,0 +1,306 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.schematic.api.core.BaseSchematicApiException;
+import com.schematic.api.core.BaseSchematicException;
+import com.schematic.api.core.BaseSchematicHttpResponse;
+import com.schematic.api.core.ClientOptions;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.core.QueryStringMapper;
+import com.schematic.api.core.RequestOptions;
+import com.schematic.api.core.RetryInterceptor;
+import com.schematic.api.errors.BadRequestError;
+import com.schematic.api.errors.ForbiddenError;
+import com.schematic.api.errors.InternalServerError;
+import com.schematic.api.errors.NotFoundError;
+import com.schematic.api.errors.UnauthorizedError;
+import com.schematic.api.resources.licenses.requests.CountLicensesRequest;
+import com.schematic.api.resources.licenses.requests.ListLicensesRequest;
+import com.schematic.api.resources.licenses.types.CountLicensesResponse;
+import com.schematic.api.resources.licenses.types.GetSingleLicenseResponse;
+import com.schematic.api.resources.licenses.types.ListLicensesResponse;
+import com.schematic.api.types.ApiError;
+import java.io.IOException;
+import okhttp3.Headers;
+import okhttp3.HttpUrl;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+
+public class RawLicensesClient {
+ protected final ClientOptions clientOptions;
+
+ public RawLicensesClient(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ }
+
+ public BaseSchematicHttpResponse listLicenses() {
+ return listLicenses(ListLicensesRequest.builder().build());
+ }
+
+ public BaseSchematicHttpResponse listLicenses(RequestOptions requestOptions) {
+ return listLicenses(ListLicensesRequest.builder().build(), requestOptions);
+ }
+
+ public BaseSchematicHttpResponse listLicenses(ListLicensesRequest request) {
+ return listLicenses(request, null);
+ }
+
+ public BaseSchematicHttpResponse listLicenses(
+ ListLicensesRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("licenses");
+ if (request.getName().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "name", request.getName().get(), false);
+ }
+ if (request.getLimit().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "limit", request.getLimit().get(), false);
+ }
+ if (request.getOffset().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "offset", request.getOffset().get(), false);
+ }
+ if (request.getFeatureIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "feature_ids", request.getFeatureIds().get(), true);
+ }
+ if (request.getIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "ids", request.getIds().get(), true);
+ }
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ListLicensesResponse.class), response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
+ public BaseSchematicHttpResponse getSingleLicense(String licenseId) {
+ return getSingleLicense(licenseId, null);
+ }
+
+ public BaseSchematicHttpResponse getSingleLicense(
+ String licenseId, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("licenses")
+ .addPathSegment(licenseId);
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request okhttpRequest = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json")
+ .build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, GetSingleLicenseResponse.class),
+ response);
+ }
+ try {
+ switch (response.code()) {
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+
+ public BaseSchematicHttpResponse countLicenses() {
+ return countLicenses(CountLicensesRequest.builder().build());
+ }
+
+ public BaseSchematicHttpResponse countLicenses(RequestOptions requestOptions) {
+ return countLicenses(CountLicensesRequest.builder().build(), requestOptions);
+ }
+
+ public BaseSchematicHttpResponse countLicenses(CountLicensesRequest request) {
+ return countLicenses(request, null);
+ }
+
+ public BaseSchematicHttpResponse countLicenses(
+ CountLicensesRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("licenses/count");
+ if (request.getName().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "name", request.getName().get(), false);
+ }
+ if (request.getLimit().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "limit", request.getLimit().get(), false);
+ }
+ if (request.getOffset().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "offset", request.getOffset().get(), false);
+ }
+ if (request.getFeatureIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(
+ httpUrl, "feature_ids", request.getFeatureIds().get(), true);
+ }
+ if (request.getIds().isPresent()) {
+ QueryStringMapper.addQueryParameter(httpUrl, "ids", request.getIds().get(), true);
+ }
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ if (requestOptions != null && requestOptions.getMaxRetries().isPresent()) {
+ okhttpRequest = okhttpRequest
+ .newBuilder()
+ .tag(
+ RetryInterceptor.MaxRetriesOverride.class,
+ new RetryInterceptor.MaxRetriesOverride(
+ requestOptions.getMaxRetries().get()))
+ .build();
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new BaseSchematicHttpResponse<>(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, CountLicensesResponse.class), response);
+ }
+ try {
+ switch (response.code()) {
+ case 400:
+ throw new BadRequestError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 401:
+ throw new UnauthorizedError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ case 500:
+ throw new InternalServerError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ApiError.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new BaseSchematicApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (JsonProcessingException e) {
+ throw new BaseSchematicException("Failed to deserialize response: " + e.getMessage(), e);
+ } catch (IOException e) {
+ throw new BaseSchematicException("Network error executing HTTP request", e);
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/requests/CountLicensesRequest.java b/src/main/java/com/schematic/api/resources/licenses/requests/CountLicensesRequest.java
new file mode 100644
index 00000000..309f2e35
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/requests/CountLicensesRequest.java
@@ -0,0 +1,227 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses.requests;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CountLicensesRequest.Builder.class)
+public final class CountLicensesRequest {
+ private final Optional> featureIds;
+
+ private final Optional> ids;
+
+ private final Optional name;
+
+ private final Optional limit;
+
+ private final Optional offset;
+
+ private final Map additionalProperties;
+
+ private CountLicensesRequest(
+ Optional> featureIds,
+ Optional> ids,
+ Optional name,
+ Optional limit,
+ Optional offset,
+ Map additionalProperties) {
+ this.featureIds = featureIds;
+ this.ids = ids;
+ this.name = name;
+ this.limit = limit;
+ this.offset = offset;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("feature_ids")
+ public Optional> getFeatureIds() {
+ return featureIds;
+ }
+
+ @JsonProperty("ids")
+ public Optional> getIds() {
+ return ids;
+ }
+
+ @JsonProperty("name")
+ public Optional getName() {
+ return name;
+ }
+
+ /**
+ * @return Page limit (default 100)
+ */
+ @JsonProperty("limit")
+ public Optional getLimit() {
+ return limit;
+ }
+
+ /**
+ * @return Page offset (default 0)
+ */
+ @JsonProperty("offset")
+ public Optional getOffset() {
+ return offset;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CountLicensesRequest && equalTo((CountLicensesRequest) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CountLicensesRequest other) {
+ return featureIds.equals(other.featureIds)
+ && ids.equals(other.ids)
+ && name.equals(other.name)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.featureIds, this.ids, this.name, this.limit, this.offset);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional> featureIds = Optional.empty();
+
+ private Optional> ids = Optional.empty();
+
+ private Optional name = Optional.empty();
+
+ private Optional limit = Optional.empty();
+
+ private Optional offset = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(CountLicensesRequest other) {
+ featureIds(other.getFeatureIds());
+ ids(other.getIds());
+ name(other.getName());
+ limit(other.getLimit());
+ offset(other.getOffset());
+ return this;
+ }
+
+ @JsonSetter(value = "feature_ids", nulls = Nulls.SKIP)
+ public Builder featureIds(Optional> featureIds) {
+ this.featureIds = featureIds;
+ return this;
+ }
+
+ public Builder featureIds(List featureIds) {
+ this.featureIds = Optional.ofNullable(featureIds);
+ return this;
+ }
+
+ public Builder featureIds(String featureIds) {
+ this.featureIds = Optional.of(Collections.singletonList(featureIds));
+ return this;
+ }
+
+ @JsonSetter(value = "ids", nulls = Nulls.SKIP)
+ public Builder ids(Optional> ids) {
+ this.ids = ids;
+ return this;
+ }
+
+ public Builder ids(List ids) {
+ this.ids = Optional.ofNullable(ids);
+ return this;
+ }
+
+ public Builder ids(String ids) {
+ this.ids = Optional.of(Collections.singletonList(ids));
+ return this;
+ }
+
+ @JsonSetter(value = "name", nulls = Nulls.SKIP)
+ public Builder name(Optional name) {
+ this.name = name;
+ return this;
+ }
+
+ public Builder name(String name) {
+ this.name = Optional.ofNullable(name);
+ return this;
+ }
+
+ /**
+ * Page limit (default 100)
+ */
+ @JsonSetter(value = "limit", nulls = Nulls.SKIP)
+ public Builder limit(Optional limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ public Builder limit(Long limit) {
+ this.limit = Optional.ofNullable(limit);
+ return this;
+ }
+
+ /**
+ * Page offset (default 0)
+ */
+ @JsonSetter(value = "offset", nulls = Nulls.SKIP)
+ public Builder offset(Optional offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ public Builder offset(Long offset) {
+ this.offset = Optional.ofNullable(offset);
+ return this;
+ }
+
+ public CountLicensesRequest build() {
+ return new CountLicensesRequest(featureIds, ids, name, limit, offset, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/requests/ListLicensesRequest.java b/src/main/java/com/schematic/api/resources/licenses/requests/ListLicensesRequest.java
new file mode 100644
index 00000000..df697e68
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/requests/ListLicensesRequest.java
@@ -0,0 +1,227 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses.requests;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = ListLicensesRequest.Builder.class)
+public final class ListLicensesRequest {
+ private final Optional> featureIds;
+
+ private final Optional> ids;
+
+ private final Optional name;
+
+ private final Optional limit;
+
+ private final Optional offset;
+
+ private final Map additionalProperties;
+
+ private ListLicensesRequest(
+ Optional> featureIds,
+ Optional> ids,
+ Optional name,
+ Optional limit,
+ Optional offset,
+ Map additionalProperties) {
+ this.featureIds = featureIds;
+ this.ids = ids;
+ this.name = name;
+ this.limit = limit;
+ this.offset = offset;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("feature_ids")
+ public Optional> getFeatureIds() {
+ return featureIds;
+ }
+
+ @JsonProperty("ids")
+ public Optional> getIds() {
+ return ids;
+ }
+
+ @JsonProperty("name")
+ public Optional getName() {
+ return name;
+ }
+
+ /**
+ * @return Page limit (default 100)
+ */
+ @JsonProperty("limit")
+ public Optional getLimit() {
+ return limit;
+ }
+
+ /**
+ * @return Page offset (default 0)
+ */
+ @JsonProperty("offset")
+ public Optional getOffset() {
+ return offset;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof ListLicensesRequest && equalTo((ListLicensesRequest) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(ListLicensesRequest other) {
+ return featureIds.equals(other.featureIds)
+ && ids.equals(other.ids)
+ && name.equals(other.name)
+ && limit.equals(other.limit)
+ && offset.equals(other.offset);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.featureIds, this.ids, this.name, this.limit, this.offset);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional> featureIds = Optional.empty();
+
+ private Optional> ids = Optional.empty();
+
+ private Optional name = Optional.empty();
+
+ private Optional limit = Optional.empty();
+
+ private Optional offset = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(ListLicensesRequest other) {
+ featureIds(other.getFeatureIds());
+ ids(other.getIds());
+ name(other.getName());
+ limit(other.getLimit());
+ offset(other.getOffset());
+ return this;
+ }
+
+ @JsonSetter(value = "feature_ids", nulls = Nulls.SKIP)
+ public Builder featureIds(Optional> featureIds) {
+ this.featureIds = featureIds;
+ return this;
+ }
+
+ public Builder featureIds(List featureIds) {
+ this.featureIds = Optional.ofNullable(featureIds);
+ return this;
+ }
+
+ public Builder featureIds(String featureIds) {
+ this.featureIds = Optional.of(Collections.singletonList(featureIds));
+ return this;
+ }
+
+ @JsonSetter(value = "ids", nulls = Nulls.SKIP)
+ public Builder ids(Optional> ids) {
+ this.ids = ids;
+ return this;
+ }
+
+ public Builder ids(List ids) {
+ this.ids = Optional.ofNullable(ids);
+ return this;
+ }
+
+ public Builder ids(String ids) {
+ this.ids = Optional.of(Collections.singletonList(ids));
+ return this;
+ }
+
+ @JsonSetter(value = "name", nulls = Nulls.SKIP)
+ public Builder name(Optional name) {
+ this.name = name;
+ return this;
+ }
+
+ public Builder name(String name) {
+ this.name = Optional.ofNullable(name);
+ return this;
+ }
+
+ /**
+ * Page limit (default 100)
+ */
+ @JsonSetter(value = "limit", nulls = Nulls.SKIP)
+ public Builder limit(Optional limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ public Builder limit(Long limit) {
+ this.limit = Optional.ofNullable(limit);
+ return this;
+ }
+
+ /**
+ * Page offset (default 0)
+ */
+ @JsonSetter(value = "offset", nulls = Nulls.SKIP)
+ public Builder offset(Optional offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ public Builder offset(Long offset) {
+ this.offset = Optional.ofNullable(offset);
+ return this;
+ }
+
+ public ListLicensesRequest build() {
+ return new ListLicensesRequest(featureIds, ids, name, limit, offset, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/types/CountLicensesParams.java b/src/main/java/com/schematic/api/resources/licenses/types/CountLicensesParams.java
new file mode 100644
index 00000000..a1280613
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/types/CountLicensesParams.java
@@ -0,0 +1,216 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CountLicensesParams.Builder.class)
+public final class CountLicensesParams {
+ private final Optional> featureIds;
+
+ private final Optional> ids;
+
+ private final Optional limit;
+
+ private final Optional name;
+
+ private final Optional offset;
+
+ private final Map additionalProperties;
+
+ private CountLicensesParams(
+ Optional> featureIds,
+ Optional> ids,
+ Optional limit,
+ Optional name,
+ Optional offset,
+ Map additionalProperties) {
+ this.featureIds = featureIds;
+ this.ids = ids;
+ this.limit = limit;
+ this.name = name;
+ this.offset = offset;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("feature_ids")
+ public Optional> getFeatureIds() {
+ return featureIds;
+ }
+
+ @JsonProperty("ids")
+ public Optional> getIds() {
+ return ids;
+ }
+
+ /**
+ * @return Page limit (default 100)
+ */
+ @JsonProperty("limit")
+ public Optional getLimit() {
+ return limit;
+ }
+
+ @JsonProperty("name")
+ public Optional getName() {
+ return name;
+ }
+
+ /**
+ * @return Page offset (default 0)
+ */
+ @JsonProperty("offset")
+ public Optional getOffset() {
+ return offset;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CountLicensesParams && equalTo((CountLicensesParams) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CountLicensesParams other) {
+ return featureIds.equals(other.featureIds)
+ && ids.equals(other.ids)
+ && limit.equals(other.limit)
+ && name.equals(other.name)
+ && offset.equals(other.offset);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.featureIds, this.ids, this.limit, this.name, this.offset);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional> featureIds = Optional.empty();
+
+ private Optional> ids = Optional.empty();
+
+ private Optional limit = Optional.empty();
+
+ private Optional name = Optional.empty();
+
+ private Optional offset = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(CountLicensesParams other) {
+ featureIds(other.getFeatureIds());
+ ids(other.getIds());
+ limit(other.getLimit());
+ name(other.getName());
+ offset(other.getOffset());
+ return this;
+ }
+
+ @JsonSetter(value = "feature_ids", nulls = Nulls.SKIP)
+ public Builder featureIds(Optional> featureIds) {
+ this.featureIds = featureIds;
+ return this;
+ }
+
+ public Builder featureIds(List featureIds) {
+ this.featureIds = Optional.ofNullable(featureIds);
+ return this;
+ }
+
+ @JsonSetter(value = "ids", nulls = Nulls.SKIP)
+ public Builder ids(Optional> ids) {
+ this.ids = ids;
+ return this;
+ }
+
+ public Builder ids(List ids) {
+ this.ids = Optional.ofNullable(ids);
+ return this;
+ }
+
+ /**
+ * Page limit (default 100)
+ */
+ @JsonSetter(value = "limit", nulls = Nulls.SKIP)
+ public Builder limit(Optional limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ public Builder limit(Long limit) {
+ this.limit = Optional.ofNullable(limit);
+ return this;
+ }
+
+ @JsonSetter(value = "name", nulls = Nulls.SKIP)
+ public Builder name(Optional name) {
+ this.name = name;
+ return this;
+ }
+
+ public Builder name(String name) {
+ this.name = Optional.ofNullable(name);
+ return this;
+ }
+
+ /**
+ * Page offset (default 0)
+ */
+ @JsonSetter(value = "offset", nulls = Nulls.SKIP)
+ public Builder offset(Optional offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ public Builder offset(Long offset) {
+ this.offset = Optional.ofNullable(offset);
+ return this;
+ }
+
+ public CountLicensesParams build() {
+ return new CountLicensesParams(featureIds, ids, limit, name, offset, additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/types/CountLicensesResponse.java b/src/main/java/com/schematic/api/resources/licenses/types/CountLicensesResponse.java
new file mode 100644
index 00000000..24d389d9
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/types/CountLicensesResponse.java
@@ -0,0 +1,152 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.CountResponse;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CountLicensesResponse.Builder.class)
+public final class CountLicensesResponse {
+ private final CountResponse data;
+
+ private final CountLicensesParams params;
+
+ private final Map additionalProperties;
+
+ private CountLicensesResponse(
+ CountResponse data, CountLicensesParams params, Map additionalProperties) {
+ this.data = data;
+ this.params = params;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("data")
+ public CountResponse getData() {
+ return data;
+ }
+
+ /**
+ * @return Input parameters
+ */
+ @JsonProperty("params")
+ public CountLicensesParams getParams() {
+ return params;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CountLicensesResponse && equalTo((CountLicensesResponse) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CountLicensesResponse other) {
+ return data.equals(other.data) && params.equals(other.params);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.data, this.params);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static DataStage builder() {
+ return new Builder();
+ }
+
+ public interface DataStage {
+ ParamsStage data(@NotNull CountResponse data);
+
+ Builder from(CountLicensesResponse other);
+ }
+
+ public interface ParamsStage {
+ /**
+ * Input parameters
+ */
+ _FinalStage params(@NotNull CountLicensesParams params);
+ }
+
+ public interface _FinalStage {
+ CountLicensesResponse build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements DataStage, ParamsStage, _FinalStage {
+ private CountResponse data;
+
+ private CountLicensesParams params;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(CountLicensesResponse other) {
+ data(other.getData());
+ params(other.getParams());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("data")
+ public ParamsStage data(@NotNull CountResponse data) {
+ this.data = Objects.requireNonNull(data, "data must not be null");
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ @JsonSetter("params")
+ public _FinalStage params(@NotNull CountLicensesParams params) {
+ this.params = Objects.requireNonNull(params, "params must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public CountLicensesResponse build() {
+ return new CountLicensesResponse(data, params, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/types/GetSingleLicenseResponse.java b/src/main/java/com/schematic/api/resources/licenses/types/GetSingleLicenseResponse.java
new file mode 100644
index 00000000..efa52bdf
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/types/GetSingleLicenseResponse.java
@@ -0,0 +1,181 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import com.schematic.api.types.LicenseResponseData;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = GetSingleLicenseResponse.Builder.class)
+public final class GetSingleLicenseResponse {
+ private final LicenseResponseData data;
+
+ private final Map params;
+
+ private final Map additionalProperties;
+
+ private GetSingleLicenseResponse(
+ LicenseResponseData data, Map params, Map additionalProperties) {
+ this.data = data;
+ this.params = params;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("data")
+ public LicenseResponseData getData() {
+ return data;
+ }
+
+ /**
+ * @return Input parameters
+ */
+ @JsonProperty("params")
+ public Map getParams() {
+ return params;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof GetSingleLicenseResponse && equalTo((GetSingleLicenseResponse) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(GetSingleLicenseResponse other) {
+ return data.equals(other.data) && params.equals(other.params);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.data, this.params);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static DataStage builder() {
+ return new Builder();
+ }
+
+ public interface DataStage {
+ _FinalStage data(@NotNull LicenseResponseData data);
+
+ Builder from(GetSingleLicenseResponse other);
+ }
+
+ public interface _FinalStage {
+ GetSingleLicenseResponse build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ /**
+ * Input parameters
+ */
+ _FinalStage params(Map params);
+
+ _FinalStage putAllParams(Map params);
+
+ _FinalStage params(String key, JsonNode value);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements DataStage, _FinalStage {
+ private LicenseResponseData data;
+
+ private Map params = new LinkedHashMap<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(GetSingleLicenseResponse other) {
+ data(other.getData());
+ params(other.getParams());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("data")
+ public _FinalStage data(@NotNull LicenseResponseData data) {
+ this.data = Objects.requireNonNull(data, "data must not be null");
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage params(String key, JsonNode value) {
+ this.params.put(key, value);
+ return this;
+ }
+
+ /**
+ * Input parameters
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage putAllParams(Map params) {
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ /**
+ * Input parameters
+ */
+ @java.lang.Override
+ @JsonSetter(value = "params", nulls = Nulls.SKIP)
+ public _FinalStage params(Map params) {
+ this.params.clear();
+ if (params != null) {
+ this.params.putAll(params);
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public GetSingleLicenseResponse build() {
+ return new GetSingleLicenseResponse(data, params, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/schematic/api/resources/licenses/types/ListLicensesParams.java b/src/main/java/com/schematic/api/resources/licenses/types/ListLicensesParams.java
new file mode 100644
index 00000000..6c37f406
--- /dev/null
+++ b/src/main/java/com/schematic/api/resources/licenses/types/ListLicensesParams.java
@@ -0,0 +1,216 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.resources.licenses.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.schematic.api.core.ObjectMappers;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = ListLicensesParams.Builder.class)
+public final class ListLicensesParams {
+ private final Optional> featureIds;
+
+ private final Optional> ids;
+
+ private final Optional limit;
+
+ private final Optional name;
+
+ private final Optional offset;
+
+ private final Map additionalProperties;
+
+ private ListLicensesParams(
+ Optional> featureIds,
+ Optional> ids,
+ Optional limit,
+ Optional name,
+ Optional offset,
+ Map additionalProperties) {
+ this.featureIds = featureIds;
+ this.ids = ids;
+ this.limit = limit;
+ this.name = name;
+ this.offset = offset;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("feature_ids")
+ public Optional> getFeatureIds() {
+ return featureIds;
+ }
+
+ @JsonProperty("ids")
+ public Optional> getIds() {
+ return ids;
+ }
+
+ /**
+ * @return Page limit (default 100)
+ */
+ @JsonProperty("limit")
+ public Optional getLimit() {
+ return limit;
+ }
+
+ @JsonProperty("name")
+ public Optional getName() {
+ return name;
+ }
+
+ /**
+ * @return Page offset (default 0)
+ */
+ @JsonProperty("offset")
+ public Optional getOffset() {
+ return offset;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof ListLicensesParams && equalTo((ListLicensesParams) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(ListLicensesParams other) {
+ return featureIds.equals(other.featureIds)
+ && ids.equals(other.ids)
+ && limit.equals(other.limit)
+ && name.equals(other.name)
+ && offset.equals(other.offset);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.featureIds, this.ids, this.limit, this.name, this.offset);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional> featureIds = Optional.empty();
+
+ private Optional> ids = Optional.empty();
+
+ private Optional limit = Optional.empty();
+
+ private Optional name = Optional.empty();
+
+ private Optional offset = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(ListLicensesParams other) {
+ featureIds(other.getFeatureIds());
+ ids(other.getIds());
+ limit(other.getLimit());
+ name(other.getName());
+ offset(other.getOffset());
+ return this;
+ }
+
+ @JsonSetter(value = "feature_ids", nulls = Nulls.SKIP)
+ public Builder featureIds(Optional> featureIds) {
+ this.featureIds = featureIds;
+ return this;
+ }
+
+ public Builder featureIds(List featureIds) {
+ this.featureIds = Optional.ofNullable(featureIds);
+ return this;
+ }
+
+ @JsonSetter(value = "ids", nulls = Nulls.SKIP)
+ public Builder ids(Optional> ids) {
+ this.ids = ids;
+ return this;
+ }
+
+ public Builder ids(List ids) {
+ this.ids = Optional.ofNullable(ids);
+ return this;
+ }
+
+ /**
+ * Page limit (default 100)
+ */
+ @JsonSetter(value = "limit", nulls = Nulls.SKIP)
+ public Builder limit(Optional limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ public Builder limit(Long limit) {
+ this.limit = Optional.ofNullable(limit);
+ return this;
+ }
+
+ @JsonSetter(value = "name", nulls = Nulls.SKIP)
+ public Builder name(Optional