001 002package com.commercetools.ml.models.image_search_config; 003 004import java.time.*; 005import java.time.ZonedDateTime; 006import java.util.*; 007import java.util.function.Function; 008 009import javax.annotation.Nullable; 010import javax.validation.constraints.NotNull; 011 012import com.fasterxml.jackson.annotation.*; 013import com.fasterxml.jackson.databind.annotation.*; 014 015import io.vrap.rmf.base.client.utils.Generated; 016 017/** 018 * ImageSearchConfigResponse 019 * 020 * <hr> 021 * Example to create an instance using the builder pattern 022 * <div class=code-example> 023 * <pre><code class='java'> 024 * ImageSearchConfigResponse imageSearchConfigResponse = ImageSearchConfigResponse.builder() 025 * .status(ImageSearchConfigStatus.ON) 026 * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z")) 027 * .build() 028 * </code></pre> 029 * </div> 030 */ 031@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 032@JsonDeserialize(as = ImageSearchConfigResponseImpl.class) 033public interface ImageSearchConfigResponse { 034 035 /** 036 * <p>The image search activation status.</p> 037 * @return status 038 */ 039 @NotNull 040 @JsonProperty("status") 041 public ImageSearchConfigStatus getStatus(); 042 043 /** 044 * 045 * @return lastModifiedAt 046 */ 047 @NotNull 048 @JsonProperty("lastModifiedAt") 049 public ZonedDateTime getLastModifiedAt(); 050 051 /** 052 * <p>The image search activation status.</p> 053 * @param status value to be set 054 */ 055 056 public void setStatus(final ImageSearchConfigStatus status); 057 058 /** 059 * set lastModifiedAt 060 * @param lastModifiedAt value to be set 061 */ 062 063 public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); 064 065 /** 066 * factory method 067 * @return instance of ImageSearchConfigResponse 068 */ 069 public static ImageSearchConfigResponse of() { 070 return new ImageSearchConfigResponseImpl(); 071 } 072 073 /** 074 * factory method to create a shallow copy ImageSearchConfigResponse 075 * @param template instance to be copied 076 * @return copy instance 077 */ 078 public static ImageSearchConfigResponse of(final ImageSearchConfigResponse template) { 079 ImageSearchConfigResponseImpl instance = new ImageSearchConfigResponseImpl(); 080 instance.setStatus(template.getStatus()); 081 instance.setLastModifiedAt(template.getLastModifiedAt()); 082 return instance; 083 } 084 085 /** 086 * factory method to create a deep copy of ImageSearchConfigResponse 087 * @param template instance to be copied 088 * @return copy instance 089 */ 090 @Nullable 091 public static ImageSearchConfigResponse deepCopy(@Nullable final ImageSearchConfigResponse template) { 092 if (template == null) { 093 return null; 094 } 095 ImageSearchConfigResponseImpl instance = new ImageSearchConfigResponseImpl(); 096 instance.setStatus(template.getStatus()); 097 instance.setLastModifiedAt(template.getLastModifiedAt()); 098 return instance; 099 } 100 101 /** 102 * builder factory method for ImageSearchConfigResponse 103 * @return builder 104 */ 105 public static ImageSearchConfigResponseBuilder builder() { 106 return ImageSearchConfigResponseBuilder.of(); 107 } 108 109 /** 110 * create builder for ImageSearchConfigResponse instance 111 * @param template instance with prefilled values for the builder 112 * @return builder 113 */ 114 public static ImageSearchConfigResponseBuilder builder(final ImageSearchConfigResponse template) { 115 return ImageSearchConfigResponseBuilder.of(template); 116 } 117 118 /** 119 * accessor map function 120 * @param <T> mapped type 121 * @param helper function to map the object 122 * @return mapped value 123 */ 124 default <T> T withImageSearchConfigResponse(Function<ImageSearchConfigResponse, T> helper) { 125 return helper.apply(this); 126 } 127 128 /** 129 * gives a TypeReference for usage with Jackson DataBind 130 * @return TypeReference 131 */ 132 public static com.fasterxml.jackson.core.type.TypeReference<ImageSearchConfigResponse> typeReference() { 133 return new com.fasterxml.jackson.core.type.TypeReference<ImageSearchConfigResponse>() { 134 @Override 135 public String toString() { 136 return "TypeReference<ImageSearchConfigResponse>"; 137 } 138 }; 139 } 140}