package de.avatic.lcc.e2e.testdata;

/**
 * Input data for a single destination in a test case.
 */
public record DestinationInput(
    String name,
    int quantity,
    boolean d2d,
    String route,
    Double d2dCost,
    Integer d2dDuration,
    Double handlingCost,
    Double repackingCost,
    Double disposalCost,
    boolean customHandling
) {
    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private String name;
        private int quantity;
        private boolean d2d;
        private String route;
        private Double d2dCost;
        private Integer d2dDuration;
        private Double handlingCost;
        private Double repackingCost;
        private Double disposalCost;
        private boolean customHandling;

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

        public Builder quantity(int quantity) {
            this.quantity = quantity;
            return this;
        }

        public Builder d2d(boolean d2d) {
            this.d2d = d2d;
            return this;
        }

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

        public Builder d2dCost(Double d2dCost) {
            this.d2dCost = d2dCost;
            return this;
        }

        public Builder d2dDuration(Integer d2dDuration) {
            this.d2dDuration = d2dDuration;
            return this;
        }

        public Builder handlingCost(Double handlingCost) {
            this.handlingCost = handlingCost;
            return this;
        }

        public Builder repackingCost(Double repackingCost) {
            this.repackingCost = repackingCost;
            return this;
        }

        public Builder disposalCost(Double disposalCost) {
            this.disposalCost = disposalCost;
            return this;
        }

        public Builder customHandling(boolean customHandling) {
            this.customHandling = customHandling;
            return this;
        }

        public DestinationInput build() {
            return new DestinationInput(
                name, quantity, d2d, route, d2dCost, d2dDuration,
                handlingCost, repackingCost, disposalCost, customHandling
            );
        }
    }
}
