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 * StagedOrderTransitionCustomLineItemStateAction 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class StagedOrderTransitionCustomLineItemStateActionImpl 022 implements StagedOrderTransitionCustomLineItemStateAction, ModelBase { 023 024 private String action; 025 026 private String customLineItemId; 027 028 private Long quantity; 029 030 private com.commercetools.api.models.state.StateResourceIdentifier fromState; 031 032 private com.commercetools.api.models.state.StateResourceIdentifier toState; 033 034 private java.time.ZonedDateTime actualTransitionDate; 035 036 /** 037 * create instance with all properties 038 */ 039 @JsonCreator 040 StagedOrderTransitionCustomLineItemStateActionImpl(@JsonProperty("customLineItemId") final String customLineItemId, 041 @JsonProperty("quantity") final Long quantity, 042 @JsonProperty("fromState") final com.commercetools.api.models.state.StateResourceIdentifier fromState, 043 @JsonProperty("toState") final com.commercetools.api.models.state.StateResourceIdentifier toState, 044 @JsonProperty("actualTransitionDate") final java.time.ZonedDateTime actualTransitionDate) { 045 this.customLineItemId = customLineItemId; 046 this.quantity = quantity; 047 this.fromState = fromState; 048 this.toState = toState; 049 this.actualTransitionDate = actualTransitionDate; 050 this.action = TRANSITION_CUSTOM_LINE_ITEM_STATE; 051 } 052 053 /** 054 * create empty instance 055 */ 056 public StagedOrderTransitionCustomLineItemStateActionImpl() { 057 this.action = TRANSITION_CUSTOM_LINE_ITEM_STATE; 058 } 059 060 /** 061 * 062 */ 063 064 public String getAction() { 065 return this.action; 066 } 067 068 /** 069 * 070 */ 071 072 public String getCustomLineItemId() { 073 return this.customLineItemId; 074 } 075 076 /** 077 * 078 */ 079 080 public Long getQuantity() { 081 return this.quantity; 082 } 083 084 /** 085 * <p>ResourceIdentifier to a State.</p> 086 */ 087 088 public com.commercetools.api.models.state.StateResourceIdentifier getFromState() { 089 return this.fromState; 090 } 091 092 /** 093 * <p>ResourceIdentifier to a State.</p> 094 */ 095 096 public com.commercetools.api.models.state.StateResourceIdentifier getToState() { 097 return this.toState; 098 } 099 100 /** 101 * 102 */ 103 104 public java.time.ZonedDateTime getActualTransitionDate() { 105 return this.actualTransitionDate; 106 } 107 108 public void setCustomLineItemId(final String customLineItemId) { 109 this.customLineItemId = customLineItemId; 110 } 111 112 public void setQuantity(final Long quantity) { 113 this.quantity = quantity; 114 } 115 116 public void setFromState(final com.commercetools.api.models.state.StateResourceIdentifier fromState) { 117 this.fromState = fromState; 118 } 119 120 public void setToState(final com.commercetools.api.models.state.StateResourceIdentifier toState) { 121 this.toState = toState; 122 } 123 124 public void setActualTransitionDate(final java.time.ZonedDateTime actualTransitionDate) { 125 this.actualTransitionDate = actualTransitionDate; 126 } 127 128 @Override 129 public boolean equals(Object o) { 130 if (this == o) 131 return true; 132 133 if (o == null || getClass() != o.getClass()) 134 return false; 135 136 StagedOrderTransitionCustomLineItemStateActionImpl that = (StagedOrderTransitionCustomLineItemStateActionImpl) o; 137 138 return new EqualsBuilder().append(action, that.action) 139 .append(customLineItemId, that.customLineItemId) 140 .append(quantity, that.quantity) 141 .append(fromState, that.fromState) 142 .append(toState, that.toState) 143 .append(actualTransitionDate, that.actualTransitionDate) 144 .isEquals(); 145 } 146 147 @Override 148 public int hashCode() { 149 return new HashCodeBuilder(17, 37).append(action) 150 .append(customLineItemId) 151 .append(quantity) 152 .append(fromState) 153 .append(toState) 154 .append(actualTransitionDate) 155 .toHashCode(); 156 } 157 158}