001 002package com.commercetools.api.models.subscription; 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>Notification about changes to a resource. The payload format differs for resource creation, update, and deletion.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ChangeSubscriptionImpl implements ChangeSubscription, ModelBase { 022 023 private com.commercetools.api.models.subscription.ChangeSubscriptionResourceTypeId resourceTypeId; 024 025 /** 026 * create instance with all properties 027 */ 028 @JsonCreator 029 ChangeSubscriptionImpl( 030 @JsonProperty("resourceTypeId") final com.commercetools.api.models.subscription.ChangeSubscriptionResourceTypeId resourceTypeId) { 031 this.resourceTypeId = resourceTypeId; 032 } 033 034 /** 035 * create empty instance 036 */ 037 public ChangeSubscriptionImpl() { 038 } 039 040 /** 041 * <p>Unique identifier for the type of resource, for example, <code>cart</code>.</p> 042 */ 043 044 public com.commercetools.api.models.subscription.ChangeSubscriptionResourceTypeId getResourceTypeId() { 045 return this.resourceTypeId; 046 } 047 048 public void setResourceTypeId( 049 final com.commercetools.api.models.subscription.ChangeSubscriptionResourceTypeId resourceTypeId) { 050 this.resourceTypeId = resourceTypeId; 051 } 052 053 @Override 054 public boolean equals(Object o) { 055 if (this == o) 056 return true; 057 058 if (o == null || getClass() != o.getClass()) 059 return false; 060 061 ChangeSubscriptionImpl that = (ChangeSubscriptionImpl) o; 062 063 return new EqualsBuilder().append(resourceTypeId, that.resourceTypeId) 064 .append(resourceTypeId, that.resourceTypeId) 065 .isEquals(); 066 } 067 068 @Override 069 public int hashCode() { 070 return new HashCodeBuilder(17, 37).append(resourceTypeId).toHashCode(); 071 } 072 073}