001 002package com.commercetools.history.models.change_value; 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 * ChangeTargetCustomLineItemsChangeValue 018 * 019 * <hr> 020 * Example to create an instance using the builder pattern 021 * <div class=code-example> 022 * <pre><code class='java'> 023 * ChangeTargetCustomLineItemsChangeValue changeTargetCustomLineItemsChangeValue = ChangeTargetCustomLineItemsChangeValue.builder() 024 * .predicate("{predicate}") 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 = ChangeTargetCustomLineItemsChangeValueImpl.class) 031public interface ChangeTargetCustomLineItemsChangeValue extends ChangeTargetChangeValue { 032 033 /** 034 * discriminator value for ChangeTargetCustomLineItemsChangeValue 035 */ 036 String CUSTOM_LINE_ITEMS = "customLineItems"; 037 038 /** 039 * 040 * @return type 041 */ 042 @NotNull 043 @JsonProperty("type") 044 public String getType(); 045 046 /** 047 * <p>Valid CustomLineItem target predicate.</p> 048 * @return predicate 049 */ 050 @NotNull 051 @JsonProperty("predicate") 052 public String getPredicate(); 053 054 /** 055 * <p>Valid CustomLineItem target predicate.</p> 056 * @param predicate value to be set 057 */ 058 059 public void setPredicate(final String predicate); 060 061 /** 062 * factory method 063 * @return instance of ChangeTargetCustomLineItemsChangeValue 064 */ 065 public static ChangeTargetCustomLineItemsChangeValue of() { 066 return new ChangeTargetCustomLineItemsChangeValueImpl(); 067 } 068 069 /** 070 * factory method to create a shallow copy ChangeTargetCustomLineItemsChangeValue 071 * @param template instance to be copied 072 * @return copy instance 073 */ 074 public static ChangeTargetCustomLineItemsChangeValue of(final ChangeTargetCustomLineItemsChangeValue template) { 075 ChangeTargetCustomLineItemsChangeValueImpl instance = new ChangeTargetCustomLineItemsChangeValueImpl(); 076 instance.setPredicate(template.getPredicate()); 077 return instance; 078 } 079 080 /** 081 * factory method to create a deep copy of ChangeTargetCustomLineItemsChangeValue 082 * @param template instance to be copied 083 * @return copy instance 084 */ 085 @Nullable 086 public static ChangeTargetCustomLineItemsChangeValue deepCopy( 087 @Nullable final ChangeTargetCustomLineItemsChangeValue template) { 088 if (template == null) { 089 return null; 090 } 091 ChangeTargetCustomLineItemsChangeValueImpl instance = new ChangeTargetCustomLineItemsChangeValueImpl(); 092 instance.setPredicate(template.getPredicate()); 093 return instance; 094 } 095 096 /** 097 * builder factory method for ChangeTargetCustomLineItemsChangeValue 098 * @return builder 099 */ 100 public static ChangeTargetCustomLineItemsChangeValueBuilder builder() { 101 return ChangeTargetCustomLineItemsChangeValueBuilder.of(); 102 } 103 104 /** 105 * create builder for ChangeTargetCustomLineItemsChangeValue instance 106 * @param template instance with prefilled values for the builder 107 * @return builder 108 */ 109 public static ChangeTargetCustomLineItemsChangeValueBuilder builder( 110 final ChangeTargetCustomLineItemsChangeValue template) { 111 return ChangeTargetCustomLineItemsChangeValueBuilder.of(template); 112 } 113 114 /** 115 * accessor map function 116 * @param <T> mapped type 117 * @param helper function to map the object 118 * @return mapped value 119 */ 120 default <T> T withChangeTargetCustomLineItemsChangeValue( 121 Function<ChangeTargetCustomLineItemsChangeValue, T> helper) { 122 return helper.apply(this); 123 } 124 125 /** 126 * gives a TypeReference for usage with Jackson DataBind 127 * @return TypeReference 128 */ 129 public static com.fasterxml.jackson.core.type.TypeReference<ChangeTargetCustomLineItemsChangeValue> typeReference() { 130 return new com.fasterxml.jackson.core.type.TypeReference<ChangeTargetCustomLineItemsChangeValue>() { 131 @Override 132 public String toString() { 133 return "TypeReference<ChangeTargetCustomLineItemsChangeValue>"; 134 } 135 }; 136 } 137}