diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthSchedule.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthSchedule.java index ef997bf8374..e6c3ae19b0e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthSchedule.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthSchedule.java @@ -37,14 +37,6 @@ public interface DayOfMonthSchedule extends RecurrencePolicySchedule { */ String DAY_OF_MONTH = "dayOfMonth"; - /** - * - * @return type - */ - @NotNull - @JsonProperty("type") - public String getType(); - /** *
The day of the month when the Recurring Order is created. If the value is greater than the number of days in a given month, the order is created on the last day of the month.
* @return day diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraft.java index d946665b91c..34893629ade 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraft.java @@ -31,17 +31,16 @@ * * */ +@io.vrap.rmf.base.client.utils.json.SubType("dayOfMonth") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DayOfMonthScheduleDraftImpl.class) public interface DayOfMonthScheduleDraft extends RecurrencePolicyScheduleDraft, io.vrap.rmf.base.client.DraftThe day of the month when the Recurring Order should be created. If the value is greater than the number of days in a given month, the order will be created on the last day of the month.
@@ -58,6 +57,25 @@ public interface DayOfMonthScheduleDraft public void setDay(final Integer day); + /** + * factory method + * @return instance of DayOfMonthScheduleDraft + */ + public static DayOfMonthScheduleDraft of() { + return new DayOfMonthScheduleDraftImpl(); + } + + /** + * factory method to create a shallow copy DayOfMonthScheduleDraft + * @param template instance to be copied + * @return copy instance + */ + public static DayOfMonthScheduleDraft of(final DayOfMonthScheduleDraft template) { + DayOfMonthScheduleDraftImpl instance = new DayOfMonthScheduleDraftImpl(); + instance.setDay(template.getDay()); + return instance; + } + public DayOfMonthScheduleDraft copyDeep(); /** @@ -75,6 +93,23 @@ public static DayOfMonthScheduleDraft deepCopy(@Nullable final DayOfMonthSchedul return instance; } + /** + * builder factory method for DayOfMonthScheduleDraft + * @return builder + */ + public static DayOfMonthScheduleDraftBuilder builder() { + return DayOfMonthScheduleDraftBuilder.of(); + } + + /** + * create builder for DayOfMonthScheduleDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DayOfMonthScheduleDraftBuilder builder(final DayOfMonthScheduleDraft template) { + return DayOfMonthScheduleDraftBuilder.of(template); + } + /** * accessor map function * @param
+ * DayOfMonthScheduleDraft dayOfMonthScheduleDraft = DayOfMonthScheduleDraft.builder()
+ * .day(1)
+ * .build()
+ *
+ * The day of the month when the Recurring Order should be created. If the value is greater than the number of days in a given month, the order will be created on the last day of the month.
+ * @param day value to be set + * @return Builder + */ + + public DayOfMonthScheduleDraftBuilder day(final Integer day) { + this.day = day; + return this; + } + + /** + *The day of the month when the Recurring Order should be created. If the value is greater than the number of days in a given month, the order will be created on the last day of the month.
+ * @return day + */ + + public Integer getDay() { + return this.day; + } + + /** + * builds DayOfMonthScheduleDraft with checking for non-null required values + * @return DayOfMonthScheduleDraft + */ + public DayOfMonthScheduleDraft build() { + Objects.requireNonNull(day, DayOfMonthScheduleDraft.class + ": day is missing"); + return new DayOfMonthScheduleDraftImpl(day); + } + + /** + * builds DayOfMonthScheduleDraft without checking for non-null required values + * @return DayOfMonthScheduleDraft + */ + public DayOfMonthScheduleDraft buildUnchecked() { + return new DayOfMonthScheduleDraftImpl(day); + } + + /** + * factory method for an instance of DayOfMonthScheduleDraftBuilder + * @return builder + */ + public static DayOfMonthScheduleDraftBuilder of() { + return new DayOfMonthScheduleDraftBuilder(); + } + + /** + * create builder for DayOfMonthScheduleDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DayOfMonthScheduleDraftBuilder of(final DayOfMonthScheduleDraft template) { + DayOfMonthScheduleDraftBuilder builder = new DayOfMonthScheduleDraftBuilder(); + builder.day = template.getDay(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraftImpl.java index 0f444252adc..e8675c20685 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/DayOfMonthScheduleDraftImpl.java @@ -34,15 +34,16 @@ public class DayOfMonthScheduleDraftImpl implements DayOfMonthScheduleDraft, Mod * create instance with all properties */ @JsonCreator - DayOfMonthScheduleDraftImpl(@JsonProperty("type") final String type, @JsonProperty("day") final Integer day) { - this.type = type; + DayOfMonthScheduleDraftImpl(@JsonProperty("day") final Integer day) { this.day = day; + this.type = DAY_OF_MONTH; } /** * create empty instance */ public DayOfMonthScheduleDraftImpl() { + this.type = DAY_OF_MONTH; } /** diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraft.java index afeb85f0d2e..384971107cf 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/recurrence_policy/RecurrencePolicyScheduleDraft.java @@ -21,9 +21,8 @@ * Example to create a subtype instance using the builder pattern *
- * RecurrencePolicyScheduleDraft recurrencePolicyScheduleDraft = RecurrencePolicyScheduleDraft.standardBuilder()
- * value(0.3)
- * intervalUnit(IntervalUnit.DAYS)
+ * RecurrencePolicyScheduleDraft recurrencePolicyScheduleDraft = RecurrencePolicyScheduleDraft.dayOfMonthBuilder()
+ * day(1)
* .build()
*
*