|
| 1 | + |
| 2 | +package com.commercetools.api.models.error; |
| 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 if the requested search service is not ready. The search might be deactivated or indexing is in progress.</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 | + * GraphQLSearchNotReadyError graphQLSearchNotReadyError = GraphQLSearchNotReadyError.builder() |
| 25 | + * .build() |
| 26 | + * </code></pre> |
| 27 | + * </div> |
| 28 | + */ |
| 29 | +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") |
| 30 | +@JsonDeserialize(as = GraphQLSearchNotReadyErrorImpl.class) |
| 31 | +public interface GraphQLSearchNotReadyError extends GraphQLErrorObject { |
| 32 | + |
| 33 | + /** |
| 34 | + * discriminator value for GraphQLSearchNotReadyError |
| 35 | + */ |
| 36 | + String SEARCH_NOT_READY = "SearchNotReady"; |
| 37 | + |
| 38 | + /** |
| 39 | + * |
| 40 | + * @return code |
| 41 | + */ |
| 42 | + @NotNull |
| 43 | + @JsonProperty("code") |
| 44 | + public String getCode(); |
| 45 | + |
| 46 | + /** |
| 47 | + * factory method |
| 48 | + * @return instance of GraphQLSearchNotReadyError |
| 49 | + */ |
| 50 | + public static GraphQLSearchNotReadyError of() { |
| 51 | + return new GraphQLSearchNotReadyErrorImpl(); |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * factory method to create a shallow copy GraphQLSearchNotReadyError |
| 56 | + * @param template instance to be copied |
| 57 | + * @return copy instance |
| 58 | + */ |
| 59 | + public static GraphQLSearchNotReadyError of(final GraphQLSearchNotReadyError template) { |
| 60 | + GraphQLSearchNotReadyErrorImpl instance = new GraphQLSearchNotReadyErrorImpl(); |
| 61 | + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); |
| 62 | + return instance; |
| 63 | + } |
| 64 | + |
| 65 | + /** |
| 66 | + * factory method to create a deep copy of GraphQLSearchNotReadyError |
| 67 | + * @param template instance to be copied |
| 68 | + * @return copy instance |
| 69 | + */ |
| 70 | + @Nullable |
| 71 | + public static GraphQLSearchNotReadyError deepCopy(@Nullable final GraphQLSearchNotReadyError template) { |
| 72 | + if (template == null) { |
| 73 | + return null; |
| 74 | + } |
| 75 | + GraphQLSearchNotReadyErrorImpl instance = new GraphQLSearchNotReadyErrorImpl(); |
| 76 | + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); |
| 77 | + return instance; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * builder factory method for GraphQLSearchNotReadyError |
| 82 | + * @return builder |
| 83 | + */ |
| 84 | + public static GraphQLSearchNotReadyErrorBuilder builder() { |
| 85 | + return GraphQLSearchNotReadyErrorBuilder.of(); |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * create builder for GraphQLSearchNotReadyError instance |
| 90 | + * @param template instance with prefilled values for the builder |
| 91 | + * @return builder |
| 92 | + */ |
| 93 | + public static GraphQLSearchNotReadyErrorBuilder builder(final GraphQLSearchNotReadyError template) { |
| 94 | + return GraphQLSearchNotReadyErrorBuilder.of(template); |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * accessor map function |
| 99 | + * @param <T> mapped type |
| 100 | + * @param helper function to map the object |
| 101 | + * @return mapped value |
| 102 | + */ |
| 103 | + default <T> T withGraphQLSearchNotReadyError(Function<GraphQLSearchNotReadyError, T> helper) { |
| 104 | + return helper.apply(this); |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * gives a TypeReference for usage with Jackson DataBind |
| 109 | + * @return TypeReference |
| 110 | + */ |
| 111 | + public static com.fasterxml.jackson.core.type.TypeReference<GraphQLSearchNotReadyError> typeReference() { |
| 112 | + return new com.fasterxml.jackson.core.type.TypeReference<GraphQLSearchNotReadyError>() { |
| 113 | + @Override |
| 114 | + public String toString() { |
| 115 | + return "TypeReference<GraphQLSearchNotReadyError>"; |
| 116 | + } |
| 117 | + }; |
| 118 | + } |
| 119 | +} |
0 commit comments