It could be an instance of the 'anyOf' schemas.
*/
@@ -247,17 +292,24 @@ public void setActualInstance(Object instance) {
return;
}
+ if (instance instanceof ReverseEtlDbtCloudScheduleConfig) {
+ super.setActualInstance(instance);
+ return;
+ }
+
throw new RuntimeException(
"Invalid instance type. Must be ReverseEtlCronScheduleConfig,"
- + " ReverseEtlPeriodicScheduleConfig, ReverseEtlSpecificTimeScheduleConfig");
+ + " ReverseEtlDbtCloudScheduleConfig, ReverseEtlPeriodicScheduleConfig,"
+ + " ReverseEtlSpecificTimeScheduleConfig");
}
/**
* Get the actual instance, which can be the following: ReverseEtlCronScheduleConfig,
- * ReverseEtlPeriodicScheduleConfig, ReverseEtlSpecificTimeScheduleConfig
+ * ReverseEtlDbtCloudScheduleConfig, ReverseEtlPeriodicScheduleConfig,
+ * ReverseEtlSpecificTimeScheduleConfig
*
- * @return The actual instance (ReverseEtlCronScheduleConfig, ReverseEtlPeriodicScheduleConfig,
- * ReverseEtlSpecificTimeScheduleConfig)
+ * @return The actual instance (ReverseEtlCronScheduleConfig, ReverseEtlDbtCloudScheduleConfig,
+ * ReverseEtlPeriodicScheduleConfig, ReverseEtlSpecificTimeScheduleConfig)
*/
@Override
public Object getActualInstance() {
@@ -300,6 +352,18 @@ public ReverseEtlCronScheduleConfig getReverseEtlCronScheduleConfig()
return (ReverseEtlCronScheduleConfig) super.getActualInstance();
}
+ /**
+ * Get the actual instance of `ReverseEtlDbtCloudScheduleConfig`. If the actual instance is not
+ * `ReverseEtlDbtCloudScheduleConfig`, the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `ReverseEtlDbtCloudScheduleConfig`
+ * @throws ClassCastException if the instance is not `ReverseEtlDbtCloudScheduleConfig`
+ */
+ public ReverseEtlDbtCloudScheduleConfig getReverseEtlDbtCloudScheduleConfig()
+ throws ClassCastException {
+ return (ReverseEtlDbtCloudScheduleConfig) super.getActualInstance();
+ }
+
/**
* Validates the JSON Element and throws an exception if issues found
*
@@ -344,10 +408,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
e.getMessage()));
// continue to the next one
}
+ // validate the json string with ReverseEtlDbtCloudScheduleConfig
+ try {
+ ReverseEtlDbtCloudScheduleConfig.validateJsonElement(jsonElement);
+ return;
+ } catch (Exception e) {
+ errorMessages.add(
+ String.format(
+ "Deserialization for ReverseEtlDbtCloudScheduleConfig failed with"
+ + " `%s`.",
+ e.getMessage()));
+ // continue to the next one
+ }
throw new IOException(
String.format(
"The JSON string is invalid for Config with anyOf schemas:"
- + " ReverseEtlCronScheduleConfig, ReverseEtlPeriodicScheduleConfig,"
+ + " ReverseEtlCronScheduleConfig, ReverseEtlDbtCloudScheduleConfig,"
+ + " ReverseEtlPeriodicScheduleConfig,"
+ " ReverseEtlSpecificTimeScheduleConfig. no class match the result,"
+ " expected at least 1. Detailed failure message for anyOf schemas:"
+ " %s. JSON: %s",
diff --git a/src/main/java/com/segment/publicapi/models/DbtModelSyncTrigger.java b/src/main/java/com/segment/publicapi/models/DbtModelSyncTrigger.java
index 8d8555e5..78d96c4b 100644
--- a/src/main/java/com/segment/publicapi/models/DbtModelSyncTrigger.java
+++ b/src/main/java/com/segment/publicapi/models/DbtModelSyncTrigger.java
@@ -27,7 +27,7 @@
import java.util.Objects;
import java.util.Set;
-/** Defines the DBT Model Sync Trigger. */
+/** Defines the dbt Model Sync Trigger. */
public class DbtModelSyncTrigger {
public static final String SERIALIZED_NAME_ID = "id";
@@ -53,7 +53,7 @@ public DbtModelSyncTrigger id(String id) {
}
/**
- * The id of the DBT Model Sync.
+ * The id of the dbt model sync.
*
* @return id
*/
diff --git a/src/main/java/com/segment/publicapi/models/ReverseEtlDbtCloudScheduleConfig.java b/src/main/java/com/segment/publicapi/models/ReverseEtlDbtCloudScheduleConfig.java
new file mode 100644
index 00000000..493daba2
--- /dev/null
+++ b/src/main/java/com/segment/publicapi/models/ReverseEtlDbtCloudScheduleConfig.java
@@ -0,0 +1,249 @@
+/*
+ * Segment Public API
+ * The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
+ *
+ * Contact: friends@segment.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.segment.publicapi.models;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.TypeAdapter;
+import com.google.gson.TypeAdapterFactory;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.reflect.TypeToken;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import com.segment.publicapi.JSON;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+/** Definition for a schedule triggered by dbt Cloud job events. */
+public class ReverseEtlDbtCloudScheduleConfig {
+ public static final String SERIALIZED_NAME_JOB_ID = "jobId";
+
+ @SerializedName(SERIALIZED_NAME_JOB_ID)
+ private String jobId;
+
+ public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId";
+
+ @SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
+ private String accountId;
+
+ public ReverseEtlDbtCloudScheduleConfig() {}
+
+ public ReverseEtlDbtCloudScheduleConfig jobId(String jobId) {
+
+ this.jobId = jobId;
+ return this;
+ }
+
+ /**
+ * The dbt Cloud job used to trigger a sync for a Reverse ETL Connection.
+ *
+ * @return jobId
+ */
+ @javax.annotation.Nonnull
+ public String getJobId() {
+ return jobId;
+ }
+
+ public void setJobId(String jobId) {
+ this.jobId = jobId;
+ }
+
+ public ReverseEtlDbtCloudScheduleConfig accountId(String accountId) {
+
+ this.accountId = accountId;
+ return this;
+ }
+
+ /**
+ * The dbt Cloud account where the job belongs to.
+ *
+ * @return accountId
+ */
+ @javax.annotation.Nonnull
+ public String getAccountId() {
+ return accountId;
+ }
+
+ public void setAccountId(String accountId) {
+ this.accountId = accountId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ReverseEtlDbtCloudScheduleConfig reverseEtlDbtCloudScheduleConfig =
+ (ReverseEtlDbtCloudScheduleConfig) o;
+ return Objects.equals(this.jobId, reverseEtlDbtCloudScheduleConfig.jobId)
+ && Objects.equals(this.accountId, reverseEtlDbtCloudScheduleConfig.accountId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(jobId, accountId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ReverseEtlDbtCloudScheduleConfig {\n");
+ sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n");
+ sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ public static HashSet It could be an instance of the 'anyOf' schemas.
*/
@@ -245,17 +290,24 @@ public void setActualInstance(Object instance) {
return;
}
+ if (instance instanceof ReverseEtlDbtCloudScheduleConfig) {
+ super.setActualInstance(instance);
+ return;
+ }
+
throw new RuntimeException(
"Invalid instance type. Must be ReverseEtlCronScheduleConfig,"
- + " ReverseEtlPeriodicScheduleConfig, ReverseEtlSpecificTimeScheduleConfig");
+ + " ReverseEtlDbtCloudScheduleConfig, ReverseEtlPeriodicScheduleConfig,"
+ + " ReverseEtlSpecificTimeScheduleConfig");
}
/**
* Get the actual instance, which can be the following: ReverseEtlCronScheduleConfig,
- * ReverseEtlPeriodicScheduleConfig, ReverseEtlSpecificTimeScheduleConfig
+ * ReverseEtlDbtCloudScheduleConfig, ReverseEtlPeriodicScheduleConfig,
+ * ReverseEtlSpecificTimeScheduleConfig
*
- * @return The actual instance (ReverseEtlCronScheduleConfig, ReverseEtlPeriodicScheduleConfig,
- * ReverseEtlSpecificTimeScheduleConfig)
+ * @return The actual instance (ReverseEtlCronScheduleConfig, ReverseEtlDbtCloudScheduleConfig,
+ * ReverseEtlPeriodicScheduleConfig, ReverseEtlSpecificTimeScheduleConfig)
*/
@Override
public Object getActualInstance() {
@@ -298,6 +350,18 @@ public ReverseEtlCronScheduleConfig getReverseEtlCronScheduleConfig()
return (ReverseEtlCronScheduleConfig) super.getActualInstance();
}
+ /**
+ * Get the actual instance of `ReverseEtlDbtCloudScheduleConfig`. If the actual instance is not
+ * `ReverseEtlDbtCloudScheduleConfig`, the ClassCastException will be thrown.
+ *
+ * @return The actual instance of `ReverseEtlDbtCloudScheduleConfig`
+ * @throws ClassCastException if the instance is not `ReverseEtlDbtCloudScheduleConfig`
+ */
+ public ReverseEtlDbtCloudScheduleConfig getReverseEtlDbtCloudScheduleConfig()
+ throws ClassCastException {
+ return (ReverseEtlDbtCloudScheduleConfig) super.getActualInstance();
+ }
+
/**
* Validates the JSON Element and throws an exception if issues found
*
@@ -342,11 +406,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
e.getMessage()));
// continue to the next one
}
+ // validate the json string with ReverseEtlDbtCloudScheduleConfig
+ try {
+ ReverseEtlDbtCloudScheduleConfig.validateJsonElement(jsonElement);
+ return;
+ } catch (Exception e) {
+ errorMessages.add(
+ String.format(
+ "Deserialization for ReverseEtlDbtCloudScheduleConfig failed with"
+ + " `%s`.",
+ e.getMessage()));
+ // continue to the next one
+ }
throw new IOException(
String.format(
"The JSON string is invalid for ReverseEtlScheduleConfig with anyOf"
+ " schemas: ReverseEtlCronScheduleConfig,"
- + " ReverseEtlPeriodicScheduleConfig,"
+ + " ReverseEtlDbtCloudScheduleConfig, ReverseEtlPeriodicScheduleConfig,"
+ " ReverseEtlSpecificTimeScheduleConfig. no class match the result,"
+ " expected at least 1. Detailed failure message for anyOf schemas:"
+ " %s. JSON: %s",
diff --git a/src/main/java/com/segment/publicapi/models/ReverseEtlScheduleDefinition.java b/src/main/java/com/segment/publicapi/models/ReverseEtlScheduleDefinition.java
index ba4eae98..9b466492 100644
--- a/src/main/java/com/segment/publicapi/models/ReverseEtlScheduleDefinition.java
+++ b/src/main/java/com/segment/publicapi/models/ReverseEtlScheduleDefinition.java
@@ -35,11 +35,13 @@
* strategy.
*/
public class ReverseEtlScheduleDefinition {
- /** Strategy supports: Periodic, Specific Days, Manual, CRON. */
+ /** Strategy supports: Periodic, Specific Days, Manual, CRON and DBT_CLOUD. */
@JsonAdapter(StrategyEnum.Adapter.class)
public enum StrategyEnum {
CRON("CRON"),
+ DBT_CLOUD("DBT_CLOUD"),
+
MANUAL("MANUAL"),
PERIODIC("PERIODIC"),
@@ -104,7 +106,7 @@ public ReverseEtlScheduleDefinition strategy(StrategyEnum strategy) {
}
/**
- * Strategy supports: Periodic, Specific Days, Manual, CRON.
+ * Strategy supports: Periodic, Specific Days, Manual, CRON and DBT_CLOUD.
*
* @return strategy
*/