001 002package com.commercetools.history.models.common; 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 * ProductVariantChannelAvailability 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ProductVariantChannelAvailabilityImpl implements ProductVariantChannelAvailability, ModelBase { 022 023 private Boolean isOnStock; 024 025 private Integer restockableInDays; 026 027 private Integer availableQuantity; 028 029 /** 030 * create instance with all properties 031 */ 032 @JsonCreator 033 ProductVariantChannelAvailabilityImpl(@JsonProperty("isOnStock") final Boolean isOnStock, 034 @JsonProperty("restockableInDays") final Integer restockableInDays, 035 @JsonProperty("availableQuantity") final Integer availableQuantity) { 036 this.isOnStock = isOnStock; 037 this.restockableInDays = restockableInDays; 038 this.availableQuantity = availableQuantity; 039 } 040 041 /** 042 * create empty instance 043 */ 044 public ProductVariantChannelAvailabilityImpl() { 045 } 046 047 /** 048 * 049 */ 050 051 public Boolean getIsOnStock() { 052 return this.isOnStock; 053 } 054 055 /** 056 * 057 */ 058 059 public Integer getRestockableInDays() { 060 return this.restockableInDays; 061 } 062 063 /** 064 * 065 */ 066 067 public Integer getAvailableQuantity() { 068 return this.availableQuantity; 069 } 070 071 public void setIsOnStock(final Boolean isOnStock) { 072 this.isOnStock = isOnStock; 073 } 074 075 public void setRestockableInDays(final Integer restockableInDays) { 076 this.restockableInDays = restockableInDays; 077 } 078 079 public void setAvailableQuantity(final Integer availableQuantity) { 080 this.availableQuantity = availableQuantity; 081 } 082 083 @Override 084 public boolean equals(Object o) { 085 if (this == o) 086 return true; 087 088 if (o == null || getClass() != o.getClass()) 089 return false; 090 091 ProductVariantChannelAvailabilityImpl that = (ProductVariantChannelAvailabilityImpl) o; 092 093 return new EqualsBuilder().append(isOnStock, that.isOnStock) 094 .append(restockableInDays, that.restockableInDays) 095 .append(availableQuantity, that.availableQuantity) 096 .append(isOnStock, that.isOnStock) 097 .append(restockableInDays, that.restockableInDays) 098 .append(availableQuantity, that.availableQuantity) 099 .isEquals(); 100 } 101 102 @Override 103 public int hashCode() { 104 return new HashCodeBuilder(17, 37).append(isOnStock) 105 .append(restockableInDays) 106 .append(availableQuantity) 107 .toHashCode(); 108 } 109 110}