com.commercetools.history.models.common.DeliveryImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commercetools-sdk-java-history Show documentation
Show all versions of commercetools-sdk-java-history Show documentation
The e-commerce SDK from commercetools Composable Commerce for Java
package com.commercetools.history.models.common;
import java.time.*;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.*;
import io.vrap.rmf.base.client.ModelBase;
import io.vrap.rmf.base.client.utils.Generated;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
/**
* Delivery
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class DeliveryImpl implements Delivery, ModelBase {
private String id;
private String createdAt;
private java.util.List items;
private java.util.List parcels;
private com.commercetools.history.models.common.Address address;
private com.commercetools.history.models.common.CustomFields custom;
/**
* create instance with all properties
*/
@JsonCreator
DeliveryImpl(@JsonProperty("id") final String id, @JsonProperty("createdAt") final String createdAt,
@JsonProperty("items") final java.util.List items,
@JsonProperty("parcels") final java.util.List parcels,
@JsonProperty("address") final com.commercetools.history.models.common.Address address,
@JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom) {
this.id = id;
this.createdAt = createdAt;
this.items = items;
this.parcels = parcels;
this.address = address;
this.custom = custom;
}
/**
* create empty instance
*/
public DeliveryImpl() {
}
/**
*
*/
public String getId() {
return this.id;
}
/**
*
*/
public String getCreatedAt() {
return this.createdAt;
}
/**
*
*/
public java.util.List getItems() {
return this.items;
}
/**
*
*/
public java.util.List getParcels() {
return this.parcels;
}
/**
*
*/
public com.commercetools.history.models.common.Address getAddress() {
return this.address;
}
/**
* Custom Fields for the Transaction.
*/
public com.commercetools.history.models.common.CustomFields getCustom() {
return this.custom;
}
public void setId(final String id) {
this.id = id;
}
public void setCreatedAt(final String createdAt) {
this.createdAt = createdAt;
}
public void setItems(final com.commercetools.history.models.common.DeliveryItem... items) {
this.items = new ArrayList<>(Arrays.asList(items));
}
public void setItems(final java.util.List items) {
this.items = items;
}
public void setParcels(final com.commercetools.history.models.common.Parcel... parcels) {
this.parcels = new ArrayList<>(Arrays.asList(parcels));
}
public void setParcels(final java.util.List parcels) {
this.parcels = parcels;
}
public void setAddress(final com.commercetools.history.models.common.Address address) {
this.address = address;
}
public void setCustom(final com.commercetools.history.models.common.CustomFields custom) {
this.custom = custom;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
DeliveryImpl that = (DeliveryImpl) o;
return new EqualsBuilder().append(id, that.id)
.append(createdAt, that.createdAt)
.append(items, that.items)
.append(parcels, that.parcels)
.append(address, that.address)
.append(custom, that.custom)
.append(id, that.id)
.append(createdAt, that.createdAt)
.append(items, that.items)
.append(parcels, that.parcels)
.append(address, that.address)
.append(custom, that.custom)
.isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(id)
.append(createdAt)
.append(items)
.append(parcels)
.append(address)
.append(custom)
.toHashCode();
}
}