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 * ResourceIdentifier 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ResourceIdentifierImpl implements ResourceIdentifier, ModelBase { 022 023 private String id; 024 025 private String key; 026 027 private com.commercetools.history.models.common.ReferenceTypeId typeId; 028 029 /** 030 * create instance with all properties 031 */ 032 @JsonCreator 033 ResourceIdentifierImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, 034 @JsonProperty("typeId") final com.commercetools.history.models.common.ReferenceTypeId typeId) { 035 this.id = id; 036 this.key = key; 037 this.typeId = typeId; 038 } 039 040 /** 041 * create empty instance 042 */ 043 public ResourceIdentifierImpl() { 044 } 045 046 /** 047 * 048 */ 049 050 public String getId() { 051 return this.id; 052 } 053 054 /** 055 * 056 */ 057 058 public String getKey() { 059 return this.key; 060 } 061 062 /** 063 * 064 */ 065 066 public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { 067 return this.typeId; 068 } 069 070 public void setId(final String id) { 071 this.id = id; 072 } 073 074 public void setKey(final String key) { 075 this.key = key; 076 } 077 078 public void setTypeId(final com.commercetools.history.models.common.ReferenceTypeId typeId) { 079 this.typeId = typeId; 080 } 081 082 @Override 083 public boolean equals(Object o) { 084 if (this == o) 085 return true; 086 087 if (o == null || getClass() != o.getClass()) 088 return false; 089 090 ResourceIdentifierImpl that = (ResourceIdentifierImpl) o; 091 092 return new EqualsBuilder().append(id, that.id) 093 .append(key, that.key) 094 .append(typeId, that.typeId) 095 .append(id, that.id) 096 .append(key, that.key) 097 .append(typeId, that.typeId) 098 .isEquals(); 099 } 100 101 @Override 102 public int hashCode() { 103 return new HashCodeBuilder(17, 37).append(id).append(key).append(typeId).toHashCode(); 104 } 105 106}