|
| 1 | + |
| 2 | +package com.commercetools.importapi.models.errors; |
| 3 | + |
| 4 | +import java.time.*; |
| 5 | +import java.util.*; |
| 6 | +import java.util.function.Function; |
| 7 | + |
| 8 | +import javax.annotation.Nullable; |
| 9 | + |
| 10 | +import com.fasterxml.jackson.annotation.*; |
| 11 | +import com.fasterxml.jackson.databind.annotation.*; |
| 12 | + |
| 13 | +import io.vrap.rmf.base.client.utils.Generated; |
| 14 | + |
| 15 | +import jakarta.validation.constraints.NotNull; |
| 16 | + |
| 17 | +/** |
| 18 | + * <p>Returned when attempting to create a ProductVariant and set it as the Master Variant in the same ProductVariantImport.</p> |
| 19 | + * |
| 20 | + * <hr> |
| 21 | + * Example to create an instance using the builder pattern |
| 22 | + * <div class=code-example> |
| 23 | + * <pre><code class='java'> |
| 24 | + * NewMasterVariantAdditionNotAllowedError newMasterVariantAdditionNotAllowedError = NewMasterVariantAdditionNotAllowedError.builder() |
| 25 | + * .message("{message}") |
| 26 | + * .build() |
| 27 | + * </code></pre> |
| 28 | + * </div> |
| 29 | + */ |
| 30 | +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") |
| 31 | +@JsonDeserialize(as = NewMasterVariantAdditionNotAllowedErrorImpl.class) |
| 32 | +public interface NewMasterVariantAdditionNotAllowedError extends ErrorObject { |
| 33 | + |
| 34 | + /** |
| 35 | + * discriminator value for NewMasterVariantAdditionNotAllowedError |
| 36 | + */ |
| 37 | + String NEW_MASTER_VARIANT_ADDITION_NOT_ALLOWED = "NewMasterVariantAdditionNotAllowed"; |
| 38 | + |
| 39 | + /** |
| 40 | + * <p><code>"Adding a new variant as master variant is not allowed."</code></p> |
| 41 | + * @return message |
| 42 | + */ |
| 43 | + @NotNull |
| 44 | + @JsonProperty("message") |
| 45 | + public String getMessage(); |
| 46 | + |
| 47 | + /** |
| 48 | + * <p><code>"Adding a new variant as master variant is not allowed."</code></p> |
| 49 | + * @param message value to be set |
| 50 | + */ |
| 51 | + |
| 52 | + public void setMessage(final String message); |
| 53 | + |
| 54 | + /** |
| 55 | + * factory method |
| 56 | + * @return instance of NewMasterVariantAdditionNotAllowedError |
| 57 | + */ |
| 58 | + public static NewMasterVariantAdditionNotAllowedError of() { |
| 59 | + return new NewMasterVariantAdditionNotAllowedErrorImpl(); |
| 60 | + } |
| 61 | + |
| 62 | + /** |
| 63 | + * factory method to create a shallow copy NewMasterVariantAdditionNotAllowedError |
| 64 | + * @param template instance to be copied |
| 65 | + * @return copy instance |
| 66 | + */ |
| 67 | + public static NewMasterVariantAdditionNotAllowedError of(final NewMasterVariantAdditionNotAllowedError template) { |
| 68 | + NewMasterVariantAdditionNotAllowedErrorImpl instance = new NewMasterVariantAdditionNotAllowedErrorImpl(); |
| 69 | + instance.setMessage(template.getMessage()); |
| 70 | + return instance; |
| 71 | + } |
| 72 | + |
| 73 | + /** |
| 74 | + * factory method to create a deep copy of NewMasterVariantAdditionNotAllowedError |
| 75 | + * @param template instance to be copied |
| 76 | + * @return copy instance |
| 77 | + */ |
| 78 | + @Nullable |
| 79 | + public static NewMasterVariantAdditionNotAllowedError deepCopy( |
| 80 | + @Nullable final NewMasterVariantAdditionNotAllowedError template) { |
| 81 | + if (template == null) { |
| 82 | + return null; |
| 83 | + } |
| 84 | + NewMasterVariantAdditionNotAllowedErrorImpl instance = new NewMasterVariantAdditionNotAllowedErrorImpl(); |
| 85 | + instance.setMessage(template.getMessage()); |
| 86 | + return instance; |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * builder factory method for NewMasterVariantAdditionNotAllowedError |
| 91 | + * @return builder |
| 92 | + */ |
| 93 | + public static NewMasterVariantAdditionNotAllowedErrorBuilder builder() { |
| 94 | + return NewMasterVariantAdditionNotAllowedErrorBuilder.of(); |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * create builder for NewMasterVariantAdditionNotAllowedError instance |
| 99 | + * @param template instance with prefilled values for the builder |
| 100 | + * @return builder |
| 101 | + */ |
| 102 | + public static NewMasterVariantAdditionNotAllowedErrorBuilder builder( |
| 103 | + final NewMasterVariantAdditionNotAllowedError template) { |
| 104 | + return NewMasterVariantAdditionNotAllowedErrorBuilder.of(template); |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * accessor map function |
| 109 | + * @param <T> mapped type |
| 110 | + * @param helper function to map the object |
| 111 | + * @return mapped value |
| 112 | + */ |
| 113 | + default <T> T withNewMasterVariantAdditionNotAllowedError( |
| 114 | + Function<NewMasterVariantAdditionNotAllowedError, T> helper) { |
| 115 | + return helper.apply(this); |
| 116 | + } |
| 117 | + |
| 118 | + /** |
| 119 | + * gives a TypeReference for usage with Jackson DataBind |
| 120 | + * @return TypeReference |
| 121 | + */ |
| 122 | + public static com.fasterxml.jackson.core.type.TypeReference<NewMasterVariantAdditionNotAllowedError> typeReference() { |
| 123 | + return new com.fasterxml.jackson.core.type.TypeReference<NewMasterVariantAdditionNotAllowedError>() { |
| 124 | + @Override |
| 125 | + public String toString() { |
| 126 | + return "TypeReference<NewMasterVariantAdditionNotAllowedError>"; |
| 127 | + } |
| 128 | + }; |
| 129 | + } |
| 130 | +} |
0 commit comments