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