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