001 002package com.commercetools.api.models.customer; 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>Setting the Customer Group of the Customer produces the CustomerGroupSet Message.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class CustomerSetCustomerGroupActionImpl implements CustomerSetCustomerGroupAction, ModelBase { 022 023 private String action; 024 025 private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; 026 027 /** 028 * create instance with all properties 029 */ 030 @JsonCreator 031 CustomerSetCustomerGroupActionImpl( 032 @JsonProperty("customerGroup") final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { 033 this.customerGroup = customerGroup; 034 this.action = SET_CUSTOMER_GROUP; 035 } 036 037 /** 038 * create empty instance 039 */ 040 public CustomerSetCustomerGroupActionImpl() { 041 this.action = SET_CUSTOMER_GROUP; 042 } 043 044 /** 045 * 046 */ 047 048 public String getAction() { 049 return this.action; 050 } 051 052 /** 053 * <p>Value to set. If empty, any existing value is removed.</p> 054 */ 055 056 public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { 057 return this.customerGroup; 058 } 059 060 public void setCustomerGroup( 061 final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { 062 this.customerGroup = customerGroup; 063 } 064 065 @Override 066 public boolean equals(Object o) { 067 if (this == o) 068 return true; 069 070 if (o == null || getClass() != o.getClass()) 071 return false; 072 073 CustomerSetCustomerGroupActionImpl that = (CustomerSetCustomerGroupActionImpl) o; 074 075 return new EqualsBuilder().append(action, that.action).append(customerGroup, that.customerGroup).isEquals(); 076 } 077 078 @Override 079 public int hashCode() { 080 return new HashCodeBuilder(17, 37).append(action).append(customerGroup).toHashCode(); 081 } 082 083}