Subversion Repositories SmartDukaan

Rev

View as "text/plain" | Blame | Last modification | View Log | RSS feed

/*
 * MANDII
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.spice.profitmandi.common.services.mandii;

import java.math.BigDecimal;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;

/**
 * Item
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-10-13T10:59:30.263+05:30[Asia/Kolkata]")
public class Item {
        public static final String SERIALIZED_NAME_NAME = "name";
        @JsonProperty(SERIALIZED_NAME_NAME)
        @SerializedName(SERIALIZED_NAME_NAME)
        private String name;

        public static final String SERIALIZED_NAME_SKU = "sku";
        @JsonProperty(SERIALIZED_NAME_SKU)
        @SerializedName(SERIALIZED_NAME_SKU)
        private String sku;

        public static final String SERIALIZED_NAME_QUANTITY = "quantity";
        @JsonProperty(SERIALIZED_NAME_QUANTITY)
        @SerializedName(SERIALIZED_NAME_QUANTITY)
        private BigDecimal quantity;

        public static final String SERIALIZED_NAME_PRICE = "price";
        @JsonProperty(SERIALIZED_NAME_PRICE)
        @SerializedName(SERIALIZED_NAME_PRICE)
        private Amount price;

        public Item name(String name) {

                this.name = name;
                return this;
        }

        public String getName() {
                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

        public Item sku(String sku) {

                this.sku = sku;
                return this;
        }

        public void setSku(String sku) {
                this.sku = sku;
        }

        public Item quantity(BigDecimal quantity) {

                this.quantity = quantity;
                return this;
        }

        public BigDecimal getQuantity() {
                return quantity;
        }

        public void setQuantity(BigDecimal quantity) {
                this.quantity = quantity;
        }

        public Item price(Amount price) {

                this.price = price;
                return this;
        }

        public Amount getPrice() {
                return price;
        }

        public void setPrice(Amount price) {
                this.price = price;
        }

        @Override
        public boolean equals(Object o) {
                if (this == o) {
                        return true;
                }
                if (o == null || getClass() != o.getClass()) {
                        return false;
                }
                Item item = (Item) o;
                return Objects.equals(this.name, item.name) && Objects.equals(this.sku, item.sku)
                                && Objects.equals(this.quantity, item.quantity) && Objects.equals(this.price, item.price);
        }

        @Override
        public int hashCode() {
                return Objects.hash(name, sku, quantity, price);
        }

        @Override
        public String toString() {
                StringBuilder sb = new StringBuilder();
                sb.append("class Item {\n");
                sb.append("    name: ").append(toIndentedString(name)).append("\n");
                sb.append("    sku: ").append(toIndentedString(sku)).append("\n");
                sb.append("    quantity: ").append(toIndentedString(quantity)).append("\n");
                sb.append("    price: ").append(toIndentedString(price)).append("\n");
                sb.append("}");
                return sb.toString();
        }

        /**
         * Convert the given object to string with each line indented by 4 spaces
         * (except the first line).
         */
        private String toIndentedString(Object o) {
                if (o == null) {
                        return "null";
                }
                return o.toString().replace("\n", "\n    ");
        }

}