16
16
import com .google .gson .JsonObject ;
17
17
import com .google .gson .TypeAdapter ;
18
18
import com .google .gson .TypeAdapterFactory ;
19
- import com .google .gson .annotations .JsonAdapter ;
20
19
import com .google .gson .annotations .SerializedName ;
21
20
import com .google .gson .reflect .TypeToken ;
22
21
import com .google .gson .stream .JsonReader ;
23
22
import com .google .gson .stream .JsonWriter ;
24
23
import com .segment .publicapi .JSON ;
25
24
import java .io .IOException ;
26
- import java .util .HashMap ;
27
25
import java .util .HashSet ;
28
26
import java .util .Map ;
29
27
import java .util .Objects ;
@@ -51,67 +49,6 @@ public class CreateReverseEtlModelInput {
51
49
@ SerializedName (SERIALIZED_NAME_ENABLED )
52
50
private Boolean enabled ;
53
51
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
-
115
52
public static final String SERIALIZED_NAME_QUERY = "query" ;
116
53
117
54
@ SerializedName (SERIALIZED_NAME_QUERY )
@@ -205,56 +142,6 @@ public void setEnabled(Boolean enabled) {
205
142
this .enabled = enabled ;
206
143
}
207
144
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
-
258
145
public CreateReverseEtlModelInput query (String query ) {
259
146
260
147
this .query = query ;
@@ -309,9 +196,6 @@ public boolean equals(Object o) {
309
196
&& Objects .equals (this .name , createReverseEtlModelInput .name )
310
197
&& Objects .equals (this .description , createReverseEtlModelInput .description )
311
198
&& Objects .equals (this .enabled , createReverseEtlModelInput .enabled )
312
- && Objects .equals (
313
- this .scheduleStrategy , createReverseEtlModelInput .scheduleStrategy )
314
- && Objects .equals (this .scheduleConfig , createReverseEtlModelInput .scheduleConfig )
315
199
&& Objects .equals (this .query , createReverseEtlModelInput .query )
316
200
&& Objects .equals (
317
201
this .queryIdentifierColumn ,
@@ -320,15 +204,7 @@ public boolean equals(Object o) {
320
204
321
205
@ Override
322
206
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 );
332
208
}
333
209
334
210
@ Override
@@ -339,8 +215,6 @@ public String toString() {
339
215
sb .append (" name: " ).append (toIndentedString (name )).append ("\n " );
340
216
sb .append (" description: " ).append (toIndentedString (description )).append ("\n " );
341
217
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 " );
344
218
sb .append (" query: " ).append (toIndentedString (query )).append ("\n " );
345
219
sb .append (" queryIdentifierColumn: " )
346
220
.append (toIndentedString (queryIdentifierColumn ))
@@ -370,8 +244,6 @@ private String toIndentedString(Object o) {
370
244
openapiFields .add ("name" );
371
245
openapiFields .add ("description" );
372
246
openapiFields .add ("enabled" );
373
- openapiFields .add ("scheduleStrategy" );
374
- openapiFields .add ("scheduleConfig" );
375
247
openapiFields .add ("query" );
376
248
openapiFields .add ("queryIdentifierColumn" );
377
249
@@ -381,8 +253,6 @@ private String toIndentedString(Object o) {
381
253
openapiRequiredFields .add ("name" );
382
254
openapiRequiredFields .add ("description" );
383
255
openapiRequiredFields .add ("enabled" );
384
- openapiRequiredFields .add ("scheduleStrategy" );
385
- openapiRequiredFields .add ("scheduleConfig" );
386
256
openapiRequiredFields .add ("query" );
387
257
openapiRequiredFields .add ("queryIdentifierColumn" );
388
258
}
@@ -448,13 +318,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
448
318
+ " string but got `%s`" ,
449
319
jsonObj .get ("description" ).toString ()));
450
320
}
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
- }
458
321
if (!jsonObj .get ("query" ).isJsonPrimitive ()) {
459
322
throw new IllegalArgumentException (
460
323
String .format (
0 commit comments