001 002package com.commercetools.api.models.standalone_price; 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 * <p>Updating the value of a StandalonePrice produces the StandalonePriceActiveChangedMessage.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class StandalonePriceChangeActiveActionImpl implements StandalonePriceChangeActiveAction, ModelBase { 022 023 private String action; 024 025 private Boolean active; 026 027 /** 028 * create instance with all properties 029 */ 030 @JsonCreator 031 StandalonePriceChangeActiveActionImpl(@JsonProperty("active") final Boolean active) { 032 this.active = active; 033 this.action = CHANGE_ACTIVE; 034 } 035 036 /** 037 * create empty instance 038 */ 039 public StandalonePriceChangeActiveActionImpl() { 040 this.action = CHANGE_ACTIVE; 041 } 042 043 /** 044 * 045 */ 046 047 public String getAction() { 048 return this.action; 049 } 050 051 /** 052 * <p>New value to set for the <code>active</code> field of the StandalonePrice.</p> 053 */ 054 055 public Boolean getActive() { 056 return this.active; 057 } 058 059 public void setActive(final Boolean active) { 060 this.active = active; 061 } 062 063 @Override 064 public boolean equals(Object o) { 065 if (this == o) 066 return true; 067 068 if (o == null || getClass() != o.getClass()) 069 return false; 070 071 StandalonePriceChangeActiveActionImpl that = (StandalonePriceChangeActiveActionImpl) o; 072 073 return new EqualsBuilder().append(action, that.action).append(active, that.active).isEquals(); 074 } 075 076 @Override 077 public int hashCode() { 078 return new HashCodeBuilder(17, 37).append(action).append(active).toHashCode(); 079 } 080 081}