Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
5.0 kB
2
Indexable
Never
package org.example;

import java.util.List;

public class PrintLabelRequest {
    private final String qty;
    private final String gtin;
    private final String allergenText;
    private final List<String> ingredientText;

    private final List<String> allergenValues;
    private final String custFriendlyDesc;
    private final String meatContent;
    private final String regulatedProductName;
    private final String safetyWarnings;
    private final String energyPerKcal;
    private final String price;
    private final String bestBefore;


    public String getQty() {
        return qty;
    }

    public String getGtin() {
        return gtin;
    }

    public List<String> getAllergenValues() {
        return allergenValues;
    }

    public String getAllergenText() {
        return allergenText;
    }

    public List<String> getIngredientText() {
        return ingredientText;
    }

    public String getCustFriendlyDesc() {
        return custFriendlyDesc;
    }

    public String getMeatContent() {
        return meatContent;
    }

    public String getRegulatedProductName() {
        return regulatedProductName;
    }

    public String getSafetyWarnings() {
        return safetyWarnings;
    }

    public String getEnergyPerKcal() {
        return energyPerKcal;
    }

    public String getPrice() {
        return price;
    }

    public String getBestBefore() {
        return bestBefore;
    }

    private PrintLabelRequest(Builder builder) {
        this.qty=builder.qty;
        this.gtin = builder.gtin;
        this.allergenText = builder.allergenText;
        this.ingredientText = builder.ingredientText;
        this.custFriendlyDesc = builder.custFriendlyDesc;
        this.meatContent = builder.meatContent;
        this.regulatedProductName = builder.regulatedProductName;
        this.safetyWarnings = builder.safetyWarnings;
        this.energyPerKcal = builder.energyPerKcal;
        this.price = builder.price;
        this.bestBefore = builder.bestBefore;
        this.allergenValues = builder.allergenValues;
    }

    public static class Builder {
        private String qty;
        private String gtin;
        private String allergenText;
        private List<String> ingredientText;
        private String custFriendlyDesc;
        private String meatContent;
        private String regulatedProductName;
        private String safetyWarnings;
        private String energyPerKcal;
        private String price;
        private String bestBefore;
        private List<String> allergenValues;
        public Builder qty(String qty) {
            this.qty = qty;
            return this;
        }

        public Builder gtin(String gtin) {
            this.gtin = gtin;
            return this;
        }

        public Builder allergenText(String allergenText) {
            this.allergenText = allergenText;
            return this;
        }

        public Builder ingredientText(List<String> ingredientText) {
            this.ingredientText = ingredientText;
            return this;
        }

        public Builder allergenValues(List<String> allergenValues) {
            this.allergenValues = allergenValues;
            return this;
        }

        public Builder custFriendlyDesc(String custFriendlyDesc) {
            this.custFriendlyDesc = custFriendlyDesc;
            return this;
        }

        public Builder meatContent(String meatContent) {
            this.meatContent = meatContent;
            return this;
        }

        public Builder regulatedProductName(String regulatedProductName) {
            this.regulatedProductName = regulatedProductName;
            return this;
        }

        public Builder safetyWarnings(String safetyWarnings) {
            this.safetyWarnings = safetyWarnings;
            return this;
        }

        public Builder energyPerKcal(String energyPerKcal) {
            this.energyPerKcal = energyPerKcal;
            return this;
        }

        public Builder price(String price) {
            this.price = price;
            return this;
        }

        public Builder bestBefore(String bestBefore) {
            this.bestBefore = bestBefore;
            return this;
        }

        public PrintLabelRequest build() {
            return new PrintLabelRequest(this);
        }
    }

    @Override
    public String toString() {
        return "PrintLabelRequest{" +
                "gtin='" + gtin + '\'' +
                ", allergenText='" + allergenText + '\'' +
                ", ingredientText=" + ingredientText +
                ", custFriendlyDesc='" + custFriendlyDesc + '\'' +
                ", meatContent='" + meatContent + '\'' +
                ", regulatedProductName='" + regulatedProductName + '\'' +
                ", safetyWarnings='" + safetyWarnings + '\'' +
                ", energyPerKcal='" + energyPerKcal + '\'' +
                ", price='" + price + '\'' +
                ", bestBefore='" + bestBefore + '\'' +
                '}';
    }
}

Leave a Comment