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