|
| 1 | + |
| 2 | +package com.commercetools.checkout.models.responses; |
| 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.Valid; |
| 16 | +import jakarta.validation.constraints.NotNull; |
| 17 | + |
| 18 | +/** |
| 19 | + * <p>Generated when the container element specified in the <code>expressId</code> option is not found in the DOM.</p> |
| 20 | + * |
| 21 | + * <hr> |
| 22 | + * Example to create an instance using the builder pattern |
| 23 | + * <div class=code-example> |
| 24 | + * <pre><code class='java'> |
| 25 | + * ExpressContainerNotFound expressContainerNotFound = ExpressContainerNotFound.builder() |
| 26 | + * .severity("{severity}") |
| 27 | + * .message("{message}") |
| 28 | + * .correlationId("{correlationId}") |
| 29 | + * .payload(payloadBuilder -> payloadBuilder) |
| 30 | + * .build() |
| 31 | + * </code></pre> |
| 32 | + * </div> |
| 33 | + */ |
| 34 | +@io.vrap.rmf.base.client.utils.json.SubType("express_container_not_found") |
| 35 | +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") |
| 36 | +@JsonDeserialize(as = ExpressContainerNotFoundImpl.class) |
| 37 | +public interface ExpressContainerNotFound extends ResponseMessage { |
| 38 | + |
| 39 | + /** |
| 40 | + * discriminator value for ExpressContainerNotFound |
| 41 | + */ |
| 42 | + String EXPRESS_CONTAINER_NOT_FOUND = "express_container_not_found"; |
| 43 | + |
| 44 | + /** |
| 45 | + * |
| 46 | + * @return code |
| 47 | + */ |
| 48 | + @NotNull |
| 49 | + @JsonProperty("code") |
| 50 | + public String getCode(); |
| 51 | + |
| 52 | + /** |
| 53 | + * <p>`error`</p> |
| 54 | + * @return severity |
| 55 | + */ |
| 56 | + @NotNull |
| 57 | + @JsonProperty("severity") |
| 58 | + public String getSeverity(); |
| 59 | + |
| 60 | + /** |
| 61 | + * <p>Express container not found.</p> |
| 62 | + * @return message |
| 63 | + */ |
| 64 | + @NotNull |
| 65 | + @JsonProperty("message") |
| 66 | + public String getMessage(); |
| 67 | + |
| 68 | + /** |
| 69 | + * <p>Contains the <code>id</code> of the container that was not found.</p> |
| 70 | + * @return payload |
| 71 | + */ |
| 72 | + @NotNull |
| 73 | + @Valid |
| 74 | + @JsonProperty("payload") |
| 75 | + public Object getPayload(); |
| 76 | + |
| 77 | + /** |
| 78 | + * <p>Unique identifier of the event.</p> |
| 79 | + * @return correlationId |
| 80 | + */ |
| 81 | + @NotNull |
| 82 | + @JsonProperty("correlationId") |
| 83 | + public String getCorrelationId(); |
| 84 | + |
| 85 | + /** |
| 86 | + * <p>`error`</p> |
| 87 | + * @param severity value to be set |
| 88 | + */ |
| 89 | + |
| 90 | + public void setSeverity(final String severity); |
| 91 | + |
| 92 | + /** |
| 93 | + * <p>Express container not found.</p> |
| 94 | + * @param message value to be set |
| 95 | + */ |
| 96 | + |
| 97 | + public void setMessage(final String message); |
| 98 | + |
| 99 | + /** |
| 100 | + * <p>Contains the <code>id</code> of the container that was not found.</p> |
| 101 | + * @param payload value to be set |
| 102 | + */ |
| 103 | + |
| 104 | + public void setPayload(final Object payload); |
| 105 | + |
| 106 | + /** |
| 107 | + * <p>Unique identifier of the event.</p> |
| 108 | + * @param correlationId value to be set |
| 109 | + */ |
| 110 | + |
| 111 | + public void setCorrelationId(final String correlationId); |
| 112 | + |
| 113 | + /** |
| 114 | + * factory method |
| 115 | + * @return instance of ExpressContainerNotFound |
| 116 | + */ |
| 117 | + public static ExpressContainerNotFound of() { |
| 118 | + return new ExpressContainerNotFoundImpl(); |
| 119 | + } |
| 120 | + |
| 121 | + /** |
| 122 | + * factory method to create a shallow copy ExpressContainerNotFound |
| 123 | + * @param template instance to be copied |
| 124 | + * @return copy instance |
| 125 | + */ |
| 126 | + public static ExpressContainerNotFound of(final ExpressContainerNotFound template) { |
| 127 | + ExpressContainerNotFoundImpl instance = new ExpressContainerNotFoundImpl(); |
| 128 | + instance.setSeverity(template.getSeverity()); |
| 129 | + instance.setMessage(template.getMessage()); |
| 130 | + instance.setCorrelationId(template.getCorrelationId()); |
| 131 | + instance.setPayload(template.getPayload()); |
| 132 | + return instance; |
| 133 | + } |
| 134 | + |
| 135 | + public ExpressContainerNotFound copyDeep(); |
| 136 | + |
| 137 | + /** |
| 138 | + * factory method to create a deep copy of ExpressContainerNotFound |
| 139 | + * @param template instance to be copied |
| 140 | + * @return copy instance |
| 141 | + */ |
| 142 | + @Nullable |
| 143 | + public static ExpressContainerNotFound deepCopy(@Nullable final ExpressContainerNotFound template) { |
| 144 | + if (template == null) { |
| 145 | + return null; |
| 146 | + } |
| 147 | + ExpressContainerNotFoundImpl instance = new ExpressContainerNotFoundImpl(); |
| 148 | + instance.setSeverity(template.getSeverity()); |
| 149 | + instance.setMessage(template.getMessage()); |
| 150 | + instance.setCorrelationId(template.getCorrelationId()); |
| 151 | + instance.setPayload(template.getPayload()); |
| 152 | + return instance; |
| 153 | + } |
| 154 | + |
| 155 | + /** |
| 156 | + * builder factory method for ExpressContainerNotFound |
| 157 | + * @return builder |
| 158 | + */ |
| 159 | + public static ExpressContainerNotFoundBuilder builder() { |
| 160 | + return ExpressContainerNotFoundBuilder.of(); |
| 161 | + } |
| 162 | + |
| 163 | + /** |
| 164 | + * create builder for ExpressContainerNotFound instance |
| 165 | + * @param template instance with prefilled values for the builder |
| 166 | + * @return builder |
| 167 | + */ |
| 168 | + public static ExpressContainerNotFoundBuilder builder(final ExpressContainerNotFound template) { |
| 169 | + return ExpressContainerNotFoundBuilder.of(template); |
| 170 | + } |
| 171 | + |
| 172 | + /** |
| 173 | + * accessor map function |
| 174 | + * @param <T> mapped type |
| 175 | + * @param helper function to map the object |
| 176 | + * @return mapped value |
| 177 | + */ |
| 178 | + default <T> T withExpressContainerNotFound(Function<ExpressContainerNotFound, T> helper) { |
| 179 | + return helper.apply(this); |
| 180 | + } |
| 181 | + |
| 182 | + /** |
| 183 | + * gives a TypeReference for usage with Jackson DataBind |
| 184 | + * @return TypeReference |
| 185 | + */ |
| 186 | + public static com.fasterxml.jackson.core.type.TypeReference<ExpressContainerNotFound> typeReference() { |
| 187 | + return new com.fasterxml.jackson.core.type.TypeReference<ExpressContainerNotFound>() { |
| 188 | + @Override |
| 189 | + public String toString() { |
| 190 | + return "TypeReference<ExpressContainerNotFound>"; |
| 191 | + } |
| 192 | + }; |
| 193 | + } |
| 194 | +} |
0 commit comments