001 002package com.commercetools.api.models.business_unit; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * BusinessUnitSetAddressCustomFieldAction 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class BusinessUnitSetAddressCustomFieldActionImpl implements BusinessUnitSetAddressCustomFieldAction, ModelBase { 022 023 private String action; 024 025 private String addressId; 026 027 private String name; 028 029 private java.lang.Object value; 030 031 /** 032 * create instance with all properties 033 */ 034 @JsonCreator 035 BusinessUnitSetAddressCustomFieldActionImpl(@JsonProperty("addressId") final String addressId, 036 @JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) { 037 this.addressId = addressId; 038 this.name = name; 039 this.value = value; 040 this.action = SET_ADDRESS_CUSTOM_FIELD; 041 } 042 043 /** 044 * create empty instance 045 */ 046 public BusinessUnitSetAddressCustomFieldActionImpl() { 047 this.action = SET_ADDRESS_CUSTOM_FIELD; 048 } 049 050 /** 051 * 052 */ 053 054 public String getAction() { 055 return this.action; 056 } 057 058 /** 059 * <p>ID of the address to be extended.</p> 060 */ 061 062 public String getAddressId() { 063 return this.addressId; 064 } 065 066 /** 067 * <p>Name of the Custom Field.</p> 068 */ 069 070 public String getName() { 071 return this.name; 072 } 073 074 /** 075 * <p>If <code>value</code> is absent or <code>null</code>, this field will be removed if it exists. Trying to remove a field that does not exist will fail with an InvalidOperation error. If <code>value</code> is provided, it is set for the field defined by <code>name</code>.</p> 076 */ 077 078 public java.lang.Object getValue() { 079 return this.value; 080 } 081 082 public void setAddressId(final String addressId) { 083 this.addressId = addressId; 084 } 085 086 public void setName(final String name) { 087 this.name = name; 088 } 089 090 public void setValue(final java.lang.Object value) { 091 this.value = value; 092 } 093 094 @Override 095 public boolean equals(Object o) { 096 if (this == o) 097 return true; 098 099 if (o == null || getClass() != o.getClass()) 100 return false; 101 102 BusinessUnitSetAddressCustomFieldActionImpl that = (BusinessUnitSetAddressCustomFieldActionImpl) o; 103 104 return new EqualsBuilder().append(action, that.action) 105 .append(addressId, that.addressId) 106 .append(name, that.name) 107 .append(value, that.value) 108 .isEquals(); 109 } 110 111 @Override 112 public int hashCode() { 113 return new HashCodeBuilder(17, 37).append(action).append(addressId).append(name).append(value).toHashCode(); 114 } 115 116}