001 002package com.commercetools.api.models.product; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.databind.annotation.*; 009 010import io.vrap.rmf.base.client.ModelBase; 011import io.vrap.rmf.base.client.utils.Generated; 012 013import org.apache.commons.lang3.builder.EqualsBuilder; 014import org.apache.commons.lang3.builder.HashCodeBuilder; 015 016/** 017 * <p>Removes the current projection of the Product. The staged projection is unaffected. To retrieve unpublished Products, the <code>staged</code> parameter must be set to <code>false</code> when querying/searching Product Projections. Produces the ProductUnpublished Message.</p> 018 * <p>Unpublished Products cannot be added to a Cart. However, if a Cart contains Line Items for Products that were added before the Product was unpublished, the Cart is unaffected and can still be used to create an Order. To prevent this, in addition to unpublishing the Product you should remove the Prices from the Product using Remove Price for Embedded Prices or Delete StandalonePrice for Standalone Prices.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ProductUnpublishActionImpl implements ProductUnpublishAction, ModelBase { 022 023 private String action; 024 025 /** 026 * create instance with all properties 027 */ 028 @JsonCreator 029 ProductUnpublishActionImpl() { 030 this.action = UNPUBLISH; 031 } 032 033 /** 034 * 035 */ 036 037 public String getAction() { 038 return this.action; 039 } 040 041 @Override 042 public boolean equals(Object o) { 043 if (this == o) 044 return true; 045 046 if (o == null || getClass() != o.getClass()) 047 return false; 048 049 ProductUnpublishActionImpl that = (ProductUnpublishActionImpl) o; 050 051 return new EqualsBuilder().append(action, that.action).isEquals(); 052 } 053 054 @Override 055 public int hashCode() { 056 return new HashCodeBuilder(17, 37).append(action).toHashCode(); 057 } 058 059}