@@ -65,9 +65,15 @@ public class SnapshotPolicy {
6565
6666 public static final String SERIALIZED_NAME_SCHEDULES = "schedules" ;
6767
68+ @ Deprecated
6869 @ SerializedName (SERIALIZED_NAME_SCHEDULES )
6970 @ javax .annotation .Nullable private List <SnapshotPolicySchedule > schedules = new ArrayList <>();
7071
72+ public static final String SERIALIZED_NAME_SNAPSHOT_SCHEDULES = "snapshotSchedules" ;
73+
74+ @ SerializedName (SERIALIZED_NAME_SNAPSHOT_SCHEDULES )
75+ @ javax .annotation .Nullable private List <SnapshotPolicySnapshotPolicySchedule > snapshotSchedules = new ArrayList <>();
76+
7177 public SnapshotPolicy () {}
7278
7379 public SnapshotPolicy comment (@ javax .annotation .Nullable String comment ) {
@@ -160,6 +166,7 @@ public void setName(@javax.annotation.Nullable String name) {
160166 this .name = name ;
161167 }
162168
169+ @ Deprecated
163170 public SnapshotPolicy schedules (
164171 @ javax .annotation .Nullable List <SnapshotPolicySchedule > schedules ) {
165172 this .schedules = schedules ;
@@ -175,18 +182,50 @@ public SnapshotPolicy addSchedulesItem(SnapshotPolicySchedule schedulesItem) {
175182 }
176183
177184 /**
178- * associated schedules
185+ * (deprecated) associated schedules
179186 *
180187 * @return schedules
188+ * @deprecated
181189 */
190+ @ Deprecated
182191 @ javax .annotation .Nullable public List <SnapshotPolicySchedule > getSchedules () {
183192 return schedules ;
184193 }
185194
195+ @ Deprecated
186196 public void setSchedules (@ javax .annotation .Nullable List <SnapshotPolicySchedule > schedules ) {
187197 this .schedules = schedules ;
188198 }
189199
200+ public SnapshotPolicy snapshotSchedules (
201+ @ javax .annotation .Nullable List <SnapshotPolicySnapshotPolicySchedule > snapshotSchedules ) {
202+ this .snapshotSchedules = snapshotSchedules ;
203+ return this ;
204+ }
205+
206+ public SnapshotPolicy addSnapshotSchedulesItem (
207+ SnapshotPolicySnapshotPolicySchedule snapshotSchedulesItem ) {
208+ if (this .snapshotSchedules == null ) {
209+ this .snapshotSchedules = new ArrayList <>();
210+ }
211+ this .snapshotSchedules .add (snapshotSchedulesItem );
212+ return this ;
213+ }
214+
215+ /**
216+ * associated schedules
217+ *
218+ * @return snapshotSchedules
219+ */
220+ @ javax .annotation .Nullable public List <SnapshotPolicySnapshotPolicySchedule > getSnapshotSchedules () {
221+ return snapshotSchedules ;
222+ }
223+
224+ public void setSnapshotSchedules (
225+ @ javax .annotation .Nullable List <SnapshotPolicySnapshotPolicySchedule > snapshotSchedules ) {
226+ this .snapshotSchedules = snapshotSchedules ;
227+ }
228+
190229 /**
191230 * A container for additional, undeclared properties. This is a holder for any undeclared
192231 * properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -246,12 +285,21 @@ public boolean equals(Object o) {
246285 && Objects .equals (this .id , snapshotPolicy .id )
247286 && Objects .equals (this .name , snapshotPolicy .name )
248287 && Objects .equals (this .schedules , snapshotPolicy .schedules )
288+ && Objects .equals (this .snapshotSchedules , snapshotPolicy .snapshotSchedules )
249289 && Objects .equals (this .additionalProperties , snapshotPolicy .additionalProperties );
250290 }
251291
252292 @ Override
253293 public int hashCode () {
254- return Objects .hash (comment , createdAt , enabled , id , name , schedules , additionalProperties );
294+ return Objects .hash (
295+ comment ,
296+ createdAt ,
297+ enabled ,
298+ id ,
299+ name ,
300+ schedules ,
301+ snapshotSchedules ,
302+ additionalProperties );
255303 }
256304
257305 @ Override
@@ -264,6 +312,9 @@ public String toString() {
264312 sb .append (" id: " ).append (toIndentedString (id )).append ("\n " );
265313 sb .append (" name: " ).append (toIndentedString (name )).append ("\n " );
266314 sb .append (" schedules: " ).append (toIndentedString (schedules )).append ("\n " );
315+ sb .append (" snapshotSchedules: " )
316+ .append (toIndentedString (snapshotSchedules ))
317+ .append ("\n " );
267318 sb .append (" additionalProperties: " )
268319 .append (toIndentedString (additionalProperties ))
269320 .append ("\n " );
@@ -290,7 +341,13 @@ private String toIndentedString(Object o) {
290341 openapiFields =
291342 new HashSet <String >(
292343 Arrays .asList (
293- "comment" , "createdAt" , "enabled" , "id" , "name" , "schedules" ));
344+ "comment" ,
345+ "createdAt" ,
346+ "enabled" ,
347+ "id" ,
348+ "name" ,
349+ "schedules" ,
350+ "snapshotSchedules" ));
294351
295352 // a set of required properties/fields (JSON key names)
296353 openapiRequiredFields = new HashSet <String >(0 );
@@ -357,6 +414,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
357414 ;
358415 }
359416 }
417+ if (jsonObj .get ("snapshotSchedules" ) != null
418+ && !jsonObj .get ("snapshotSchedules" ).isJsonNull ()) {
419+ JsonArray jsonArraysnapshotSchedules = jsonObj .getAsJsonArray ("snapshotSchedules" );
420+ if (jsonArraysnapshotSchedules != null ) {
421+ // ensure the json data is an array
422+ if (!jsonObj .get ("snapshotSchedules" ).isJsonArray ()) {
423+ throw new IllegalArgumentException (
424+ String .format (
425+ java .util .Locale .ROOT ,
426+ "Expected the field `snapshotSchedules` to be an array in the JSON string but got `%s`" ,
427+ jsonObj .get ("snapshotSchedules" ).toString ()));
428+ }
429+
430+ // validate the optional field `snapshotSchedules` (array)
431+ for (int i = 0 ; i < jsonArraysnapshotSchedules .size (); i ++) {
432+ SnapshotPolicySnapshotPolicySchedule .validateJsonElement (
433+ jsonArraysnapshotSchedules .get (i ));
434+ }
435+ ;
436+ }
437+ }
360438 }
361439
362440 public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
0 commit comments