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 * CustomShippingMethodChangeValue 018 * 019 * <hr> 020 * Example to create an instance using the builder pattern 021 * <div class=code-example> 022 * <pre><code class='java'> 023 * CustomShippingMethodChangeValue customShippingMethodChangeValue = CustomShippingMethodChangeValue.builder() 024 * .name("{name}") 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 = CustomShippingMethodChangeValueImpl.class) 031public interface CustomShippingMethodChangeValue { 032 033 /** 034 * <p>Name of the Custom ShippingMethod.</p> 035 * @return name 036 */ 037 @NotNull 038 @JsonProperty("name") 039 public String getName(); 040 041 /** 042 * <p>Name of the Custom ShippingMethod.</p> 043 * @param name value to be set 044 */ 045 046 public void setName(final String name); 047 048 /** 049 * factory method 050 * @return instance of CustomShippingMethodChangeValue 051 */ 052 public static CustomShippingMethodChangeValue of() { 053 return new CustomShippingMethodChangeValueImpl(); 054 } 055 056 /** 057 * factory method to create a shallow copy CustomShippingMethodChangeValue 058 * @param template instance to be copied 059 * @return copy instance 060 */ 061 public static CustomShippingMethodChangeValue of(final CustomShippingMethodChangeValue template) { 062 CustomShippingMethodChangeValueImpl instance = new CustomShippingMethodChangeValueImpl(); 063 instance.setName(template.getName()); 064 return instance; 065 } 066 067 /** 068 * factory method to create a deep copy of CustomShippingMethodChangeValue 069 * @param template instance to be copied 070 * @return copy instance 071 */ 072 @Nullable 073 public static CustomShippingMethodChangeValue deepCopy(@Nullable final CustomShippingMethodChangeValue template) { 074 if (template == null) { 075 return null; 076 } 077 CustomShippingMethodChangeValueImpl instance = new CustomShippingMethodChangeValueImpl(); 078 instance.setName(template.getName()); 079 return instance; 080 } 081 082 /** 083 * builder factory method for CustomShippingMethodChangeValue 084 * @return builder 085 */ 086 public static CustomShippingMethodChangeValueBuilder builder() { 087 return CustomShippingMethodChangeValueBuilder.of(); 088 } 089 090 /** 091 * create builder for CustomShippingMethodChangeValue instance 092 * @param template instance with prefilled values for the builder 093 * @return builder 094 */ 095 public static CustomShippingMethodChangeValueBuilder builder(final CustomShippingMethodChangeValue template) { 096 return CustomShippingMethodChangeValueBuilder.of(template); 097 } 098 099 /** 100 * accessor map function 101 * @param <T> mapped type 102 * @param helper function to map the object 103 * @return mapped value 104 */ 105 default <T> T withCustomShippingMethodChangeValue(Function<CustomShippingMethodChangeValue, T> helper) { 106 return helper.apply(this); 107 } 108 109 /** 110 * gives a TypeReference for usage with Jackson DataBind 111 * @return TypeReference 112 */ 113 public static com.fasterxml.jackson.core.type.TypeReference<CustomShippingMethodChangeValue> typeReference() { 114 return new com.fasterxml.jackson.core.type.TypeReference<CustomShippingMethodChangeValue>() { 115 @Override 116 public String toString() { 117 return "TypeReference<CustomShippingMethodChangeValue>"; 118 } 119 }; 120 } 121}