001 002package com.commercetools.history.models.common; 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 * ParcelMeasurements 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ParcelMeasurementsImpl implements ParcelMeasurements, ModelBase { 022 023 private Integer heightInMillimeter; 024 025 private Integer lengthInMillimeter; 026 027 private Integer widthInMillimeter; 028 029 private Integer weightInGram; 030 031 /** 032 * create instance with all properties 033 */ 034 @JsonCreator 035 ParcelMeasurementsImpl(@JsonProperty("heightInMillimeter") final Integer heightInMillimeter, 036 @JsonProperty("lengthInMillimeter") final Integer lengthInMillimeter, 037 @JsonProperty("widthInMillimeter") final Integer widthInMillimeter, 038 @JsonProperty("weightInGram") final Integer weightInGram) { 039 this.heightInMillimeter = heightInMillimeter; 040 this.lengthInMillimeter = lengthInMillimeter; 041 this.widthInMillimeter = widthInMillimeter; 042 this.weightInGram = weightInGram; 043 } 044 045 /** 046 * create empty instance 047 */ 048 public ParcelMeasurementsImpl() { 049 } 050 051 /** 052 * 053 */ 054 055 public Integer getHeightInMillimeter() { 056 return this.heightInMillimeter; 057 } 058 059 /** 060 * 061 */ 062 063 public Integer getLengthInMillimeter() { 064 return this.lengthInMillimeter; 065 } 066 067 /** 068 * 069 */ 070 071 public Integer getWidthInMillimeter() { 072 return this.widthInMillimeter; 073 } 074 075 /** 076 * 077 */ 078 079 public Integer getWeightInGram() { 080 return this.weightInGram; 081 } 082 083 public void setHeightInMillimeter(final Integer heightInMillimeter) { 084 this.heightInMillimeter = heightInMillimeter; 085 } 086 087 public void setLengthInMillimeter(final Integer lengthInMillimeter) { 088 this.lengthInMillimeter = lengthInMillimeter; 089 } 090 091 public void setWidthInMillimeter(final Integer widthInMillimeter) { 092 this.widthInMillimeter = widthInMillimeter; 093 } 094 095 public void setWeightInGram(final Integer weightInGram) { 096 this.weightInGram = weightInGram; 097 } 098 099 @Override 100 public boolean equals(Object o) { 101 if (this == o) 102 return true; 103 104 if (o == null || getClass() != o.getClass()) 105 return false; 106 107 ParcelMeasurementsImpl that = (ParcelMeasurementsImpl) o; 108 109 return new EqualsBuilder().append(heightInMillimeter, that.heightInMillimeter) 110 .append(lengthInMillimeter, that.lengthInMillimeter) 111 .append(widthInMillimeter, that.widthInMillimeter) 112 .append(weightInGram, that.weightInGram) 113 .append(heightInMillimeter, that.heightInMillimeter) 114 .append(lengthInMillimeter, that.lengthInMillimeter) 115 .append(widthInMillimeter, that.widthInMillimeter) 116 .append(weightInGram, that.weightInGram) 117 .isEquals(); 118 } 119 120 @Override 121 public int hashCode() { 122 return new HashCodeBuilder(17, 37).append(heightInMillimeter) 123 .append(lengthInMillimeter) 124 .append(widthInMillimeter) 125 .append(weightInGram) 126 .toHashCode(); 127 } 128 129}