001 002package com.commercetools.history.models.label; 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.history.models.common.Reference; 013import com.fasterxml.jackson.annotation.*; 014import com.fasterxml.jackson.databind.annotation.*; 015 016import io.vrap.rmf.base.client.utils.Generated; 017 018/** 019 * StagedQuoteLabel 020 * 021 * <hr> 022 * Example to create an instance using the builder pattern 023 * <div class=code-example> 024 * <pre><code class='java'> 025 * StagedQuoteLabel stagedQuoteLabel = StagedQuoteLabel.builder() 026 * .key("{key}") 027 * .customer(customerBuilder -> customerBuilder) 028 * .quoteRequest(quoteRequestBuilder -> quoteRequestBuilder) 029 * .build() 030 * </code></pre> 031 * </div> 032 */ 033@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 034@JsonDeserialize(as = StagedQuoteLabelImpl.class) 035public interface StagedQuoteLabel extends Label { 036 037 /** 038 * discriminator value for StagedQuoteLabel 039 */ 040 String STAGED_QUOTE_LABEL = "StagedQuoteLabel"; 041 042 /** 043 * 044 * @return type 045 */ 046 @NotNull 047 @JsonProperty("type") 048 public String getType(); 049 050 /** 051 * <p>User-defined unique identifier of the Staged Quote.</p> 052 * @return key 053 */ 054 @NotNull 055 @JsonProperty("key") 056 public String getKey(); 057 058 /** 059 * <p>The Buyer who requested the Quote.</p> 060 * @return customer 061 */ 062 @NotNull 063 @Valid 064 @JsonProperty("customer") 065 public Reference getCustomer(); 066 067 /** 068 * <p>Quote Request related to the Staged Quote.</p> 069 * @return quoteRequest 070 */ 071 @NotNull 072 @Valid 073 @JsonProperty("quoteRequest") 074 public Reference getQuoteRequest(); 075 076 /** 077 * <p>User-defined unique identifier of the Staged Quote.</p> 078 * @param key value to be set 079 */ 080 081 public void setKey(final String key); 082 083 /** 084 * <p>The Buyer who requested the Quote.</p> 085 * @param customer value to be set 086 */ 087 088 public void setCustomer(final Reference customer); 089 090 /** 091 * <p>Quote Request related to the Staged Quote.</p> 092 * @param quoteRequest value to be set 093 */ 094 095 public void setQuoteRequest(final Reference quoteRequest); 096 097 /** 098 * factory method 099 * @return instance of StagedQuoteLabel 100 */ 101 public static StagedQuoteLabel of() { 102 return new StagedQuoteLabelImpl(); 103 } 104 105 /** 106 * factory method to create a shallow copy StagedQuoteLabel 107 * @param template instance to be copied 108 * @return copy instance 109 */ 110 public static StagedQuoteLabel of(final StagedQuoteLabel template) { 111 StagedQuoteLabelImpl instance = new StagedQuoteLabelImpl(); 112 instance.setKey(template.getKey()); 113 instance.setCustomer(template.getCustomer()); 114 instance.setQuoteRequest(template.getQuoteRequest()); 115 return instance; 116 } 117 118 /** 119 * factory method to create a deep copy of StagedQuoteLabel 120 * @param template instance to be copied 121 * @return copy instance 122 */ 123 @Nullable 124 public static StagedQuoteLabel deepCopy(@Nullable final StagedQuoteLabel template) { 125 if (template == null) { 126 return null; 127 } 128 StagedQuoteLabelImpl instance = new StagedQuoteLabelImpl(); 129 instance.setKey(template.getKey()); 130 instance.setCustomer(com.commercetools.history.models.common.Reference.deepCopy(template.getCustomer())); 131 instance.setQuoteRequest( 132 com.commercetools.history.models.common.Reference.deepCopy(template.getQuoteRequest())); 133 return instance; 134 } 135 136 /** 137 * builder factory method for StagedQuoteLabel 138 * @return builder 139 */ 140 public static StagedQuoteLabelBuilder builder() { 141 return StagedQuoteLabelBuilder.of(); 142 } 143 144 /** 145 * create builder for StagedQuoteLabel instance 146 * @param template instance with prefilled values for the builder 147 * @return builder 148 */ 149 public static StagedQuoteLabelBuilder builder(final StagedQuoteLabel template) { 150 return StagedQuoteLabelBuilder.of(template); 151 } 152 153 /** 154 * accessor map function 155 * @param <T> mapped type 156 * @param helper function to map the object 157 * @return mapped value 158 */ 159 default <T> T withStagedQuoteLabel(Function<StagedQuoteLabel, T> helper) { 160 return helper.apply(this); 161 } 162 163 /** 164 * gives a TypeReference for usage with Jackson DataBind 165 * @return TypeReference 166 */ 167 public static com.fasterxml.jackson.core.type.TypeReference<StagedQuoteLabel> typeReference() { 168 return new com.fasterxml.jackson.core.type.TypeReference<StagedQuoteLabel>() { 169 @Override 170 public String toString() { 171 return "TypeReference<StagedQuoteLabel>"; 172 } 173 }; 174 } 175}