|
| 1 | + |
| 2 | +package com.commercetools.api.models.recurrence_policy; |
| 3 | + |
| 4 | +import java.util.*; |
| 5 | + |
| 6 | +import io.vrap.rmf.base.client.Builder; |
| 7 | +import io.vrap.rmf.base.client.utils.Generated; |
| 8 | + |
| 9 | +/** |
| 10 | + * DayOfMonthScheduleDraftBuilder |
| 11 | + * <hr> |
| 12 | + * Example to create an instance using the builder pattern |
| 13 | + * <div class=code-example> |
| 14 | + * <pre><code class='java'> |
| 15 | + * DayOfMonthScheduleDraft dayOfMonthScheduleDraft = DayOfMonthScheduleDraft.builder() |
| 16 | + * .day(1) |
| 17 | + * .build() |
| 18 | + * </code></pre> |
| 19 | + * </div> |
| 20 | + */ |
| 21 | +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") |
| 22 | +public class DayOfMonthScheduleDraftBuilder implements Builder<DayOfMonthScheduleDraft> { |
| 23 | + |
| 24 | + private Integer day; |
| 25 | + |
| 26 | + /** |
| 27 | + * <p>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.</p> |
| 28 | + * @param day value to be set |
| 29 | + * @return Builder |
| 30 | + */ |
| 31 | + |
| 32 | + public DayOfMonthScheduleDraftBuilder day(final Integer day) { |
| 33 | + this.day = day; |
| 34 | + return this; |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * <p>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.</p> |
| 39 | + * @return day |
| 40 | + */ |
| 41 | + |
| 42 | + public Integer getDay() { |
| 43 | + return this.day; |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * builds DayOfMonthScheduleDraft with checking for non-null required values |
| 48 | + * @return DayOfMonthScheduleDraft |
| 49 | + */ |
| 50 | + public DayOfMonthScheduleDraft build() { |
| 51 | + Objects.requireNonNull(day, DayOfMonthScheduleDraft.class + ": day is missing"); |
| 52 | + return new DayOfMonthScheduleDraftImpl(day); |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * builds DayOfMonthScheduleDraft without checking for non-null required values |
| 57 | + * @return DayOfMonthScheduleDraft |
| 58 | + */ |
| 59 | + public DayOfMonthScheduleDraft buildUnchecked() { |
| 60 | + return new DayOfMonthScheduleDraftImpl(day); |
| 61 | + } |
| 62 | + |
| 63 | + /** |
| 64 | + * factory method for an instance of DayOfMonthScheduleDraftBuilder |
| 65 | + * @return builder |
| 66 | + */ |
| 67 | + public static DayOfMonthScheduleDraftBuilder of() { |
| 68 | + return new DayOfMonthScheduleDraftBuilder(); |
| 69 | + } |
| 70 | + |
| 71 | + /** |
| 72 | + * create builder for DayOfMonthScheduleDraft instance |
| 73 | + * @param template instance with prefilled values for the builder |
| 74 | + * @return builder |
| 75 | + */ |
| 76 | + public static DayOfMonthScheduleDraftBuilder of(final DayOfMonthScheduleDraft template) { |
| 77 | + DayOfMonthScheduleDraftBuilder builder = new DayOfMonthScheduleDraftBuilder(); |
| 78 | + builder.day = template.getDay(); |
| 79 | + return builder; |
| 80 | + } |
| 81 | + |
| 82 | +} |
0 commit comments