001 002package com.commercetools.history.models.change_value; 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 * LocalizedEnumValue 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class LocalizedEnumValueImpl implements LocalizedEnumValue, ModelBase { 022 023 private String key; 024 025 private com.commercetools.history.models.common.LocalizedString label; 026 027 /** 028 * create instance with all properties 029 */ 030 @JsonCreator 031 LocalizedEnumValueImpl(@JsonProperty("key") final String key, 032 @JsonProperty("label") final com.commercetools.history.models.common.LocalizedString label) { 033 this.key = key; 034 this.label = label; 035 } 036 037 /** 038 * create empty instance 039 */ 040 public LocalizedEnumValueImpl() { 041 } 042 043 /** 044 * <p>Key of the value used as a programmatic identifier.</p> 045 */ 046 047 public String getKey() { 048 return this.key; 049 } 050 051 /** 052 * <p>Descriptive localized label of the value.</p> 053 */ 054 055 public com.commercetools.history.models.common.LocalizedString getLabel() { 056 return this.label; 057 } 058 059 public void setKey(final String key) { 060 this.key = key; 061 } 062 063 public void setLabel(final com.commercetools.history.models.common.LocalizedString label) { 064 this.label = label; 065 } 066 067 @Override 068 public boolean equals(Object o) { 069 if (this == o) 070 return true; 071 072 if (o == null || getClass() != o.getClass()) 073 return false; 074 075 LocalizedEnumValueImpl that = (LocalizedEnumValueImpl) o; 076 077 return new EqualsBuilder().append(key, that.key) 078 .append(label, that.label) 079 .append(key, that.key) 080 .append(label, that.label) 081 .isEquals(); 082 } 083 084 @Override 085 public int hashCode() { 086 return new HashCodeBuilder(17, 37).append(key).append(label).toHashCode(); 087 } 088 089}