001
002package com.commercetools.api.models.message;
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 *  <p>Generated after a successful Remove Billing Address Identifier update action.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class BusinessUnitBillingAddressRemovedMessagePayloadImpl
022        implements BusinessUnitBillingAddressRemovedMessagePayload, ModelBase {
023
024    private String type;
025
026    private com.commercetools.api.models.common.Address address;
027
028    /**
029     * create instance with all properties
030     */
031    @JsonCreator
032    BusinessUnitBillingAddressRemovedMessagePayloadImpl(
033            @JsonProperty("address") final com.commercetools.api.models.common.Address address) {
034        this.address = address;
035        this.type = BUSINESS_UNIT_BILLING_ADDRESS_REMOVED;
036    }
037
038    /**
039     * create empty instance
040     */
041    public BusinessUnitBillingAddressRemovedMessagePayloadImpl() {
042        this.type = BUSINESS_UNIT_BILLING_ADDRESS_REMOVED;
043    }
044
045    /**
046     *
047     */
048
049    public String getType() {
050        return this.type;
051    }
052
053    /**
054     *  <p>The address that was removed from the billing addresses of the Business Unit.</p>
055     */
056
057    public com.commercetools.api.models.common.Address getAddress() {
058        return this.address;
059    }
060
061    public void setAddress(final com.commercetools.api.models.common.Address address) {
062        this.address = address;
063    }
064
065    @Override
066    public boolean equals(Object o) {
067        if (this == o)
068            return true;
069
070        if (o == null || getClass() != o.getClass())
071            return false;
072
073        BusinessUnitBillingAddressRemovedMessagePayloadImpl that = (BusinessUnitBillingAddressRemovedMessagePayloadImpl) o;
074
075        return new EqualsBuilder().append(type, that.type).append(address, that.address).isEquals();
076    }
077
078    @Override
079    public int hashCode() {
080        return new HashCodeBuilder(17, 37).append(type).append(address).toHashCode();
081    }
082
083}