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 * Asset 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class AssetImpl implements Asset, ModelBase { 022 023 private String id; 024 025 private com.commercetools.history.models.common.LocalizedString name; 026 027 private com.commercetools.history.models.common.LocalizedString description; 028 029 private com.commercetools.history.models.common.CustomFields custom; 030 031 private String key; 032 033 /** 034 * create instance with all properties 035 */ 036 @JsonCreator 037 AssetImpl(@JsonProperty("id") final String id, 038 @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name, 039 @JsonProperty("description") final com.commercetools.history.models.common.LocalizedString description, 040 @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, 041 @JsonProperty("key") final String key) { 042 this.id = id; 043 this.name = name; 044 this.description = description; 045 this.custom = custom; 046 this.key = key; 047 } 048 049 /** 050 * create empty instance 051 */ 052 public AssetImpl() { 053 } 054 055 /** 056 * 057 */ 058 059 public String getId() { 060 return this.id; 061 } 062 063 /** 064 * 065 */ 066 067 public com.commercetools.history.models.common.LocalizedString getName() { 068 return this.name; 069 } 070 071 /** 072 * 073 */ 074 075 public com.commercetools.history.models.common.LocalizedString getDescription() { 076 return this.description; 077 } 078 079 /** 080 * 081 */ 082 083 public com.commercetools.history.models.common.CustomFields getCustom() { 084 return this.custom; 085 } 086 087 /** 088 * 089 */ 090 091 public String getKey() { 092 return this.key; 093 } 094 095 public void setId(final String id) { 096 this.id = id; 097 } 098 099 public void setName(final com.commercetools.history.models.common.LocalizedString name) { 100 this.name = name; 101 } 102 103 public void setDescription(final com.commercetools.history.models.common.LocalizedString description) { 104 this.description = description; 105 } 106 107 public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { 108 this.custom = custom; 109 } 110 111 public void setKey(final String key) { 112 this.key = key; 113 } 114 115 @Override 116 public boolean equals(Object o) { 117 if (this == o) 118 return true; 119 120 if (o == null || getClass() != o.getClass()) 121 return false; 122 123 AssetImpl that = (AssetImpl) o; 124 125 return new EqualsBuilder().append(id, that.id) 126 .append(name, that.name) 127 .append(description, that.description) 128 .append(custom, that.custom) 129 .append(key, that.key) 130 .append(id, that.id) 131 .append(name, that.name) 132 .append(description, that.description) 133 .append(custom, that.custom) 134 .append(key, that.key) 135 .isEquals(); 136 } 137 138 @Override 139 public int hashCode() { 140 return new HashCodeBuilder(17, 37).append(id) 141 .append(name) 142 .append(description) 143 .append(custom) 144 .append(key) 145 .toHashCode(); 146 } 147 148}