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 * GeoLocation 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class GeoLocationImpl implements GeoLocation, ModelBase { 022 023 private String type; 024 025 private java.util.List<Integer> coordinates; 026 027 /** 028 * create instance with all properties 029 */ 030 @JsonCreator 031 GeoLocationImpl(@JsonProperty("type") final String type, 032 @JsonProperty("coordinates") final java.util.List<Integer> coordinates) { 033 this.type = type; 034 this.coordinates = coordinates; 035 } 036 037 /** 038 * create empty instance 039 */ 040 public GeoLocationImpl() { 041 } 042 043 /** 044 * 045 */ 046 047 public String getType() { 048 return this.type; 049 } 050 051 /** 052 * 053 */ 054 055 public java.util.List<Integer> getCoordinates() { 056 return this.coordinates; 057 } 058 059 public void setType(final String type) { 060 this.type = type; 061 } 062 063 public void setCoordinates(final Integer... coordinates) { 064 this.coordinates = new ArrayList<>(Arrays.asList(coordinates)); 065 } 066 067 public void setCoordinates(final java.util.List<Integer> coordinates) { 068 this.coordinates = coordinates; 069 } 070 071 @Override 072 public boolean equals(Object o) { 073 if (this == o) 074 return true; 075 076 if (o == null || getClass() != o.getClass()) 077 return false; 078 079 GeoLocationImpl that = (GeoLocationImpl) o; 080 081 return new EqualsBuilder().append(type, that.type) 082 .append(coordinates, that.coordinates) 083 .append(type, that.type) 084 .append(coordinates, that.coordinates) 085 .isEquals(); 086 } 087 088 @Override 089 public int hashCode() { 090 return new HashCodeBuilder(17, 37).append(type).append(coordinates).toHashCode(); 091 } 092 093}