001 002package com.commercetools.api.models.category; 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 * CategoryChangeAssetNameAction 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class CategoryChangeAssetNameActionImpl implements CategoryChangeAssetNameAction, ModelBase { 022 023 private String action; 024 025 private String assetId; 026 027 private String assetKey; 028 029 private com.commercetools.api.models.common.LocalizedString name; 030 031 /** 032 * create instance with all properties 033 */ 034 @JsonCreator 035 CategoryChangeAssetNameActionImpl(@JsonProperty("assetId") final String assetId, 036 @JsonProperty("assetKey") final String assetKey, 037 @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name) { 038 this.assetId = assetId; 039 this.assetKey = assetKey; 040 this.name = name; 041 this.action = CHANGE_ASSET_NAME; 042 } 043 044 /** 045 * create empty instance 046 */ 047 public CategoryChangeAssetNameActionImpl() { 048 this.action = CHANGE_ASSET_NAME; 049 } 050 051 /** 052 * 053 */ 054 055 public String getAction() { 056 return this.action; 057 } 058 059 /** 060 * <p>New value to set. Either <code>assetId</code> or <code>assetKey</code> is required.</p> 061 */ 062 063 public String getAssetId() { 064 return this.assetId; 065 } 066 067 /** 068 * <p>New value to set. Either <code>assetId</code> or <code>assetKey</code> is required.</p> 069 */ 070 071 public String getAssetKey() { 072 return this.assetKey; 073 } 074 075 /** 076 * <p>New value to set. Must not be empty.</p> 077 */ 078 079 public com.commercetools.api.models.common.LocalizedString getName() { 080 return this.name; 081 } 082 083 public void setAssetId(final String assetId) { 084 this.assetId = assetId; 085 } 086 087 public void setAssetKey(final String assetKey) { 088 this.assetKey = assetKey; 089 } 090 091 public void setName(final com.commercetools.api.models.common.LocalizedString name) { 092 this.name = name; 093 } 094 095 @Override 096 public boolean equals(Object o) { 097 if (this == o) 098 return true; 099 100 if (o == null || getClass() != o.getClass()) 101 return false; 102 103 CategoryChangeAssetNameActionImpl that = (CategoryChangeAssetNameActionImpl) o; 104 105 return new EqualsBuilder().append(action, that.action) 106 .append(assetId, that.assetId) 107 .append(assetKey, that.assetKey) 108 .append(name, that.name) 109 .isEquals(); 110 } 111 112 @Override 113 public int hashCode() { 114 return new HashCodeBuilder(17, 37).append(action).append(assetId).append(assetKey).append(name).toHashCode(); 115 } 116 117}