body) {
return this;
}
+ /**
+ * Requires a secret API key, and trusted_client_clock. Import historical data without affecting billing.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage backfill(Boolean backfill) {
+ this.backfill = Optional.ofNullable(backfill);
+ return this;
+ }
+
+ /**
+ * Requires a secret API key, and trusted_client_clock. Import historical data without affecting billing.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "backfill", nulls = Nulls.SKIP)
+ public _FinalStage backfill(Optional backfill) {
+ this.backfill = backfill;
+ return this;
+ }
+
@java.lang.Override
public CreateEventRequestBody build() {
- return new CreateEventRequestBody(body, eventType, idempotencyKey, sentAt, additionalProperties);
+ return new CreateEventRequestBody(
+ backfill, body, eventType, idempotencyKey, sentAt, trustedClientClock, additionalProperties);
}
@java.lang.Override
diff --git a/src/main/java/com/schematic/api/types/CreditLeaseResponseData.java b/src/main/java/com/schematic/api/types/CreditLeaseResponseData.java
new file mode 100644
index 0000000..3b6c1be
--- /dev/null
+++ b/src/main/java/com/schematic/api/types/CreditLeaseResponseData.java
@@ -0,0 +1,322 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.schematic.api.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.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CreditLeaseResponseData.Builder.class)
+public final class CreditLeaseResponseData {
+ private final String companyId;
+
+ private final OffsetDateTime createdAt;
+
+ private final String creditTypeId;
+
+ private final OffsetDateTime expiresAt;
+
+ private final double grantedAmount;
+
+ private final String id;
+
+ private final Optional releasedAt;
+
+ private final OffsetDateTime updatedAt;
+
+ private final Map additionalProperties;
+
+ private CreditLeaseResponseData(
+ String companyId,
+ OffsetDateTime createdAt,
+ String creditTypeId,
+ OffsetDateTime expiresAt,
+ double grantedAmount,
+ String id,
+ Optional releasedAt,
+ OffsetDateTime updatedAt,
+ Map additionalProperties) {
+ this.companyId = companyId;
+ this.createdAt = createdAt;
+ this.creditTypeId = creditTypeId;
+ this.expiresAt = expiresAt;
+ this.grantedAmount = grantedAmount;
+ this.id = id;
+ this.releasedAt = releasedAt;
+ this.updatedAt = updatedAt;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("company_id")
+ public String getCompanyId() {
+ return companyId;
+ }
+
+ @JsonProperty("created_at")
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ @JsonProperty("credit_type_id")
+ public String getCreditTypeId() {
+ return creditTypeId;
+ }
+
+ @JsonProperty("expires_at")
+ public OffsetDateTime getExpiresAt() {
+ return expiresAt;
+ }
+
+ @JsonProperty("granted_amount")
+ public double getGrantedAmount() {
+ return grantedAmount;
+ }
+
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ @JsonProperty("released_at")
+ public Optional getReleasedAt() {
+ return releasedAt;
+ }
+
+ @JsonProperty("updated_at")
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CreditLeaseResponseData && equalTo((CreditLeaseResponseData) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CreditLeaseResponseData other) {
+ return companyId.equals(other.companyId)
+ && createdAt.equals(other.createdAt)
+ && creditTypeId.equals(other.creditTypeId)
+ && expiresAt.equals(other.expiresAt)
+ && grantedAmount == other.grantedAmount
+ && id.equals(other.id)
+ && releasedAt.equals(other.releasedAt)
+ && updatedAt.equals(other.updatedAt);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(
+ this.companyId,
+ this.createdAt,
+ this.creditTypeId,
+ this.expiresAt,
+ this.grantedAmount,
+ this.id,
+ this.releasedAt,
+ this.updatedAt);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static CompanyIdStage builder() {
+ return new Builder();
+ }
+
+ public interface CompanyIdStage {
+ CreatedAtStage companyId(@NotNull String companyId);
+
+ Builder from(CreditLeaseResponseData other);
+ }
+
+ public interface CreatedAtStage {
+ CreditTypeIdStage createdAt(@NotNull OffsetDateTime createdAt);
+ }
+
+ public interface CreditTypeIdStage {
+ ExpiresAtStage creditTypeId(@NotNull String creditTypeId);
+ }
+
+ public interface ExpiresAtStage {
+ GrantedAmountStage expiresAt(@NotNull OffsetDateTime expiresAt);
+ }
+
+ public interface GrantedAmountStage {
+ IdStage grantedAmount(double grantedAmount);
+ }
+
+ public interface IdStage {
+ UpdatedAtStage id(@NotNull String id);
+ }
+
+ public interface UpdatedAtStage {
+ _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt);
+ }
+
+ public interface _FinalStage {
+ CreditLeaseResponseData build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ _FinalStage releasedAt(Optional releasedAt);
+
+ _FinalStage releasedAt(OffsetDateTime releasedAt);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder
+ implements CompanyIdStage,
+ CreatedAtStage,
+ CreditTypeIdStage,
+ ExpiresAtStage,
+ GrantedAmountStage,
+ IdStage,
+ UpdatedAtStage,
+ _FinalStage {
+ private String companyId;
+
+ private OffsetDateTime createdAt;
+
+ private String creditTypeId;
+
+ private OffsetDateTime expiresAt;
+
+ private double grantedAmount;
+
+ private String id;
+
+ private OffsetDateTime updatedAt;
+
+ private Optional releasedAt = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(CreditLeaseResponseData other) {
+ companyId(other.getCompanyId());
+ createdAt(other.getCreatedAt());
+ creditTypeId(other.getCreditTypeId());
+ expiresAt(other.getExpiresAt());
+ grantedAmount(other.getGrantedAmount());
+ id(other.getId());
+ releasedAt(other.getReleasedAt());
+ updatedAt(other.getUpdatedAt());
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("company_id")
+ public CreatedAtStage companyId(@NotNull String companyId) {
+ this.companyId = Objects.requireNonNull(companyId, "companyId must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("created_at")
+ public CreditTypeIdStage createdAt(@NotNull OffsetDateTime createdAt) {
+ this.createdAt = Objects.requireNonNull(createdAt, "createdAt must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("credit_type_id")
+ public ExpiresAtStage creditTypeId(@NotNull String creditTypeId) {
+ this.creditTypeId = Objects.requireNonNull(creditTypeId, "creditTypeId must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("expires_at")
+ public GrantedAmountStage expiresAt(@NotNull OffsetDateTime expiresAt) {
+ this.expiresAt = Objects.requireNonNull(expiresAt, "expiresAt must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("granted_amount")
+ public IdStage grantedAmount(double grantedAmount) {
+ this.grantedAmount = grantedAmount;
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("id")
+ public UpdatedAtStage id(@NotNull String id) {
+ this.id = Objects.requireNonNull(id, "id must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter("updated_at")
+ public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) {
+ this.updatedAt = Objects.requireNonNull(updatedAt, "updatedAt must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage releasedAt(OffsetDateTime releasedAt) {
+ this.releasedAt = Optional.ofNullable(releasedAt);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "released_at", nulls = Nulls.SKIP)
+ public _FinalStage releasedAt(Optional releasedAt) {
+ this.releasedAt = releasedAt;
+ return this;
+ }
+
+ @java.lang.Override
+ public CreditLeaseResponseData build() {
+ return new CreditLeaseResponseData(
+ companyId,
+ createdAt,
+ creditTypeId,
+ expiresAt,
+ grantedAmount,
+ id,
+ releasedAt,
+ updatedAt,
+ 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/types/DataEventPayload.java b/src/main/java/com/schematic/api/types/DataEventPayload.java
index de6b7ac..aa7c8f3 100644
--- a/src/main/java/com/schematic/api/types/DataEventPayload.java
+++ b/src/main/java/com/schematic/api/types/DataEventPayload.java
@@ -25,27 +25,35 @@
public final class DataEventPayload {
private final String apiKey;
+ private final Optional backfill;
+
private final Optional