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 * TextLineItem
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class TextLineItemImpl implements TextLineItem, ModelBase {
022
023    private String addedAt;
024
025    private com.commercetools.history.models.common.CustomFields custom;
026
027    private com.commercetools.history.models.common.LocalizedString description;
028
029    private String id;
030
031    private com.commercetools.history.models.common.LocalizedString name;
032
033    private Integer quantity;
034
035    /**
036     * create instance with all properties
037     */
038    @JsonCreator
039    TextLineItemImpl(@JsonProperty("addedAt") final String addedAt,
040            @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom,
041            @JsonProperty("description") final com.commercetools.history.models.common.LocalizedString description,
042            @JsonProperty("id") final String id,
043            @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name,
044            @JsonProperty("quantity") final Integer quantity) {
045        this.addedAt = addedAt;
046        this.custom = custom;
047        this.description = description;
048        this.id = id;
049        this.name = name;
050        this.quantity = quantity;
051    }
052
053    /**
054     * create empty instance
055     */
056    public TextLineItemImpl() {
057    }
058
059    /**
060     *
061     */
062
063    public String getAddedAt() {
064        return this.addedAt;
065    }
066
067    /**
068     *
069     */
070
071    public com.commercetools.history.models.common.CustomFields getCustom() {
072        return this.custom;
073    }
074
075    /**
076     *
077     */
078
079    public com.commercetools.history.models.common.LocalizedString getDescription() {
080        return this.description;
081    }
082
083    /**
084     *
085     */
086
087    public String getId() {
088        return this.id;
089    }
090
091    /**
092     *
093     */
094
095    public com.commercetools.history.models.common.LocalizedString getName() {
096        return this.name;
097    }
098
099    /**
100     *
101     */
102
103    public Integer getQuantity() {
104        return this.quantity;
105    }
106
107    public void setAddedAt(final String addedAt) {
108        this.addedAt = addedAt;
109    }
110
111    public void setCustom(final com.commercetools.history.models.common.CustomFields custom) {
112        this.custom = custom;
113    }
114
115    public void setDescription(final com.commercetools.history.models.common.LocalizedString description) {
116        this.description = description;
117    }
118
119    public void setId(final String id) {
120        this.id = id;
121    }
122
123    public void setName(final com.commercetools.history.models.common.LocalizedString name) {
124        this.name = name;
125    }
126
127    public void setQuantity(final Integer quantity) {
128        this.quantity = quantity;
129    }
130
131    @Override
132    public boolean equals(Object o) {
133        if (this == o)
134            return true;
135
136        if (o == null || getClass() != o.getClass())
137            return false;
138
139        TextLineItemImpl that = (TextLineItemImpl) o;
140
141        return new EqualsBuilder().append(addedAt, that.addedAt)
142                .append(custom, that.custom)
143                .append(description, that.description)
144                .append(id, that.id)
145                .append(name, that.name)
146                .append(quantity, that.quantity)
147                .append(addedAt, that.addedAt)
148                .append(custom, that.custom)
149                .append(description, that.description)
150                .append(id, that.id)
151                .append(name, that.name)
152                .append(quantity, that.quantity)
153                .isEquals();
154    }
155
156    @Override
157    public int hashCode() {
158        return new HashCodeBuilder(17, 37).append(addedAt)
159                .append(custom)
160                .append(description)
161                .append(id)
162                .append(name)
163                .append(quantity)
164                .toHashCode();
165    }
166
167}