com.commercetools.history.models.common.ItemShippingDetailsImpl 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;
/**
* ItemShippingDetails
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ItemShippingDetailsImpl implements ItemShippingDetails, ModelBase {
private java.util.List targets;
private Boolean valid;
/**
* create instance with all properties
*/
@JsonCreator
ItemShippingDetailsImpl(
@JsonProperty("targets") final java.util.List targets,
@JsonProperty("valid") final Boolean valid) {
this.targets = targets;
this.valid = valid;
}
/**
* create empty instance
*/
public ItemShippingDetailsImpl() {
}
/**
*
*/
public java.util.List getTargets() {
return this.targets;
}
/**
* true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets
, false
otherwise. A cart cannot be ordered when the value is false
. The error InvalidItemShippingDetails will be triggered.
*/
public Boolean getValid() {
return this.valid;
}
public void setTargets(final com.commercetools.history.models.common.ItemShippingTarget... targets) {
this.targets = new ArrayList<>(Arrays.asList(targets));
}
public void setTargets(final java.util.List targets) {
this.targets = targets;
}
public void setValid(final Boolean valid) {
this.valid = valid;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ItemShippingDetailsImpl that = (ItemShippingDetailsImpl) o;
return new EqualsBuilder().append(targets, that.targets)
.append(valid, that.valid)
.append(targets, that.targets)
.append(valid, that.valid)
.isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(targets).append(valid).toHashCode();
}
}