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