001 002package com.commercetools.api.models.order_edit; 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 * StagedOrderRemoveDeliveryAction 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class StagedOrderRemoveDeliveryActionImpl implements StagedOrderRemoveDeliveryAction, ModelBase { 022 023 private String action; 024 025 private String deliveryId; 026 027 private String deliveryKey; 028 029 /** 030 * create instance with all properties 031 */ 032 @JsonCreator 033 StagedOrderRemoveDeliveryActionImpl(@JsonProperty("deliveryId") final String deliveryId, 034 @JsonProperty("deliveryKey") final String deliveryKey) { 035 this.deliveryId = deliveryId; 036 this.deliveryKey = deliveryKey; 037 this.action = REMOVE_DELIVERY; 038 } 039 040 /** 041 * create empty instance 042 */ 043 public StagedOrderRemoveDeliveryActionImpl() { 044 this.action = REMOVE_DELIVERY; 045 } 046 047 /** 048 * 049 */ 050 051 public String getAction() { 052 return this.action; 053 } 054 055 /** 056 * <p>Either <code>deliveryId</code> or <code>deliveryKey</code> is required for this update action.</p> 057 */ 058 059 public String getDeliveryId() { 060 return this.deliveryId; 061 } 062 063 /** 064 * <p>Either <code>deliveryId</code> or <code>deliveryKey</code> is required for this update action.</p> 065 */ 066 067 public String getDeliveryKey() { 068 return this.deliveryKey; 069 } 070 071 public void setDeliveryId(final String deliveryId) { 072 this.deliveryId = deliveryId; 073 } 074 075 public void setDeliveryKey(final String deliveryKey) { 076 this.deliveryKey = deliveryKey; 077 } 078 079 @Override 080 public boolean equals(Object o) { 081 if (this == o) 082 return true; 083 084 if (o == null || getClass() != o.getClass()) 085 return false; 086 087 StagedOrderRemoveDeliveryActionImpl that = (StagedOrderRemoveDeliveryActionImpl) o; 088 089 return new EqualsBuilder().append(action, that.action) 090 .append(deliveryId, that.deliveryId) 091 .append(deliveryKey, that.deliveryKey) 092 .isEquals(); 093 } 094 095 @Override 096 public int hashCode() { 097 return new HashCodeBuilder(17, 37).append(action).append(deliveryId).append(deliveryKey).toHashCode(); 098 } 099 100}