1616import com .google .gson .JsonObject ;
1717import com .google .gson .TypeAdapter ;
1818import com .google .gson .TypeAdapterFactory ;
19- import com .google .gson .annotations .JsonAdapter ;
2019import com .google .gson .annotations .SerializedName ;
2120import com .google .gson .reflect .TypeToken ;
2221import com .google .gson .stream .JsonReader ;
2322import com .google .gson .stream .JsonWriter ;
2423import com .segment .publicapi .JSON ;
2524import java .io .IOException ;
26- import java .util .HashMap ;
2725import java .util .HashSet ;
2826import java .util .Map ;
2927import java .util .Objects ;
@@ -51,67 +49,6 @@ public class CreateReverseEtlModelInput {
5149 @ SerializedName (SERIALIZED_NAME_ENABLED )
5250 private Boolean enabled ;
5351
54- /**
55- * Determines the strategy used for triggering syncs, which will be used in conjunction with
56- * scheduleConfig.
57- */
58- @ JsonAdapter (ScheduleStrategyEnum .Adapter .class )
59- public enum ScheduleStrategyEnum {
60- MANUAL ("MANUAL" ),
61-
62- PERIODIC ("PERIODIC" ),
63-
64- SPECIFIC_DAYS ("SPECIFIC_DAYS" );
65-
66- private String value ;
67-
68- ScheduleStrategyEnum (String value ) {
69- this .value = value ;
70- }
71-
72- public String getValue () {
73- return value ;
74- }
75-
76- @ Override
77- public String toString () {
78- return String .valueOf (value );
79- }
80-
81- public static ScheduleStrategyEnum fromValue (String value ) {
82- for (ScheduleStrategyEnum b : ScheduleStrategyEnum .values ()) {
83- if (b .value .equals (value )) {
84- return b ;
85- }
86- }
87- throw new IllegalArgumentException ("Unexpected value '" + value + "'" );
88- }
89-
90- public static class Adapter extends TypeAdapter <ScheduleStrategyEnum > {
91- @ Override
92- public void write (final JsonWriter jsonWriter , final ScheduleStrategyEnum enumeration )
93- throws IOException {
94- jsonWriter .value (enumeration .getValue ());
95- }
96-
97- @ Override
98- public ScheduleStrategyEnum read (final JsonReader jsonReader ) throws IOException {
99- String value = jsonReader .nextString ();
100- return ScheduleStrategyEnum .fromValue (value );
101- }
102- }
103- }
104-
105- public static final String SERIALIZED_NAME_SCHEDULE_STRATEGY = "scheduleStrategy" ;
106-
107- @ SerializedName (SERIALIZED_NAME_SCHEDULE_STRATEGY )
108- private ScheduleStrategyEnum scheduleStrategy ;
109-
110- public static final String SERIALIZED_NAME_SCHEDULE_CONFIG = "scheduleConfig" ;
111-
112- @ SerializedName (SERIALIZED_NAME_SCHEDULE_CONFIG )
113- private Map <String , Object > scheduleConfig ;
114-
11552 public static final String SERIALIZED_NAME_QUERY = "query" ;
11653
11754 @ SerializedName (SERIALIZED_NAME_QUERY )
@@ -205,56 +142,6 @@ public void setEnabled(Boolean enabled) {
205142 this .enabled = enabled ;
206143 }
207144
208- public CreateReverseEtlModelInput scheduleStrategy (ScheduleStrategyEnum scheduleStrategy ) {
209-
210- this .scheduleStrategy = scheduleStrategy ;
211- return this ;
212- }
213-
214- /**
215- * Determines the strategy used for triggering syncs, which will be used in conjunction with
216- * scheduleConfig.
217- *
218- * @return scheduleStrategy
219- */
220- @ javax .annotation .Nonnull
221- public ScheduleStrategyEnum getScheduleStrategy () {
222- return scheduleStrategy ;
223- }
224-
225- public void setScheduleStrategy (ScheduleStrategyEnum scheduleStrategy ) {
226- this .scheduleStrategy = scheduleStrategy ;
227- }
228-
229- public CreateReverseEtlModelInput scheduleConfig (Map <String , Object > scheduleConfig ) {
230-
231- this .scheduleConfig = scheduleConfig ;
232- return this ;
233- }
234-
235- public CreateReverseEtlModelInput putScheduleConfigItem (String key , Object scheduleConfigItem ) {
236- if (this .scheduleConfig == null ) {
237- this .scheduleConfig = new HashMap <>();
238- }
239- this .scheduleConfig .put (key , scheduleConfigItem );
240- return this ;
241- }
242-
243- /**
244- * Defines a configuration object used for scheduling, which can vary depending on the
245- * configured strategy, but must always be an object with at least 1 level of keys.
246- *
247- * @return scheduleConfig
248- */
249- @ javax .annotation .Nonnull
250- public Map <String , Object > getScheduleConfig () {
251- return scheduleConfig ;
252- }
253-
254- public void setScheduleConfig (Map <String , Object > scheduleConfig ) {
255- this .scheduleConfig = scheduleConfig ;
256- }
257-
258145 public CreateReverseEtlModelInput query (String query ) {
259146
260147 this .query = query ;
@@ -309,9 +196,6 @@ public boolean equals(Object o) {
309196 && Objects .equals (this .name , createReverseEtlModelInput .name )
310197 && Objects .equals (this .description , createReverseEtlModelInput .description )
311198 && Objects .equals (this .enabled , createReverseEtlModelInput .enabled )
312- && Objects .equals (
313- this .scheduleStrategy , createReverseEtlModelInput .scheduleStrategy )
314- && Objects .equals (this .scheduleConfig , createReverseEtlModelInput .scheduleConfig )
315199 && Objects .equals (this .query , createReverseEtlModelInput .query )
316200 && Objects .equals (
317201 this .queryIdentifierColumn ,
@@ -320,15 +204,7 @@ public boolean equals(Object o) {
320204
321205 @ Override
322206 public int hashCode () {
323- return Objects .hash (
324- sourceId ,
325- name ,
326- description ,
327- enabled ,
328- scheduleStrategy ,
329- scheduleConfig ,
330- query ,
331- queryIdentifierColumn );
207+ return Objects .hash (sourceId , name , description , enabled , query , queryIdentifierColumn );
332208 }
333209
334210 @ Override
@@ -339,8 +215,6 @@ public String toString() {
339215 sb .append (" name: " ).append (toIndentedString (name )).append ("\n " );
340216 sb .append (" description: " ).append (toIndentedString (description )).append ("\n " );
341217 sb .append (" enabled: " ).append (toIndentedString (enabled )).append ("\n " );
342- sb .append (" scheduleStrategy: " ).append (toIndentedString (scheduleStrategy )).append ("\n " );
343- sb .append (" scheduleConfig: " ).append (toIndentedString (scheduleConfig )).append ("\n " );
344218 sb .append (" query: " ).append (toIndentedString (query )).append ("\n " );
345219 sb .append (" queryIdentifierColumn: " )
346220 .append (toIndentedString (queryIdentifierColumn ))
@@ -370,8 +244,6 @@ private String toIndentedString(Object o) {
370244 openapiFields .add ("name" );
371245 openapiFields .add ("description" );
372246 openapiFields .add ("enabled" );
373- openapiFields .add ("scheduleStrategy" );
374- openapiFields .add ("scheduleConfig" );
375247 openapiFields .add ("query" );
376248 openapiFields .add ("queryIdentifierColumn" );
377249
@@ -381,8 +253,6 @@ private String toIndentedString(Object o) {
381253 openapiRequiredFields .add ("name" );
382254 openapiRequiredFields .add ("description" );
383255 openapiRequiredFields .add ("enabled" );
384- openapiRequiredFields .add ("scheduleStrategy" );
385- openapiRequiredFields .add ("scheduleConfig" );
386256 openapiRequiredFields .add ("query" );
387257 openapiRequiredFields .add ("queryIdentifierColumn" );
388258 }
@@ -448,13 +318,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
448318 + " string but got `%s`" ,
449319 jsonObj .get ("description" ).toString ()));
450320 }
451- if (!jsonObj .get ("scheduleStrategy" ).isJsonPrimitive ()) {
452- throw new IllegalArgumentException (
453- String .format (
454- "Expected the field `scheduleStrategy` to be a primitive type in the"
455- + " JSON string but got `%s`" ,
456- jsonObj .get ("scheduleStrategy" ).toString ()));
457- }
458321 if (!jsonObj .get ("query" ).isJsonPrimitive ()) {
459322 throw new IllegalArgumentException (
460323 String .format (
0 commit comments