001 002package com.commercetools.api.models.order; 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 * OrderSetShippingAddressCustomFieldAction 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class OrderSetShippingAddressCustomFieldActionImpl 022 implements OrderSetShippingAddressCustomFieldAction, ModelBase { 023 024 private String action; 025 026 private String name; 027 028 private java.lang.Object value; 029 030 /** 031 * create instance with all properties 032 */ 033 @JsonCreator 034 OrderSetShippingAddressCustomFieldActionImpl(@JsonProperty("name") final String name, 035 @JsonProperty("value") final java.lang.Object value) { 036 this.name = name; 037 this.value = value; 038 this.action = SET_SHIPPING_ADDRESS_CUSTOM_FIELD; 039 } 040 041 /** 042 * create empty instance 043 */ 044 public OrderSetShippingAddressCustomFieldActionImpl() { 045 this.action = SET_SHIPPING_ADDRESS_CUSTOM_FIELD; 046 } 047 048 /** 049 * 050 */ 051 052 public String getAction() { 053 return this.action; 054 } 055 056 /** 057 * <p>Name of the Custom Field.</p> 058 */ 059 060 public String getName() { 061 return this.name; 062 } 063 064 /** 065 * <p>If <code>value</code> is absent or <code>null</code>, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If <code>value</code> is provided, it is set for the field defined by <code>name</code>.</p> 066 */ 067 068 public java.lang.Object getValue() { 069 return this.value; 070 } 071 072 public void setName(final String name) { 073 this.name = name; 074 } 075 076 public void setValue(final java.lang.Object value) { 077 this.value = value; 078 } 079 080 @Override 081 public boolean equals(Object o) { 082 if (this == o) 083 return true; 084 085 if (o == null || getClass() != o.getClass()) 086 return false; 087 088 OrderSetShippingAddressCustomFieldActionImpl that = (OrderSetShippingAddressCustomFieldActionImpl) o; 089 090 return new EqualsBuilder().append(action, that.action) 091 .append(name, that.name) 092 .append(value, that.value) 093 .append(action, that.action) 094 .append(name, that.name) 095 .append(value, that.value) 096 .isEquals(); 097 } 098 099 @Override 100 public int hashCode() { 101 return new HashCodeBuilder(17, 37).append(action).append(name).append(value).toHashCode(); 102 } 103 104}