package de.avatic.lcc.model.calculation;

import java.math.BigDecimal;


/**
 * Represents the result of a custom calculation containing values related to customs duties and costs.
 * This class holds information about custom value, duties, rates and annual costs.
 */
public class CustomResult {

    /**
     * Represents an empty calculation result with all values set to zero
     */
    public static final CustomResult EMPTY = new CustomResult(BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO);

    /**
     * The custom value used in calculation
     */
    BigDecimal customValue;

    /**
     * The custom risk value used in calculation
     */
    BigDecimal customRiskValue;

    /**
     * The custom chance value used in calculation
     */
    BigDecimal customChanceValue;

    /**
     * The calculated custom duties
     */
    BigDecimal customDuties;
    /**
     * The custom rate applied in calculation
     */
    BigDecimal tariffRate;
    /**
     * The calculated annual cost
     */
    BigDecimal annualCost;

    /**
     * The calculated annual risk cost
     */
    BigDecimal annualRiskCost;

    /**
     * The calculated annual chance cost
     */
    BigDecimal annualChanceCost;

    /**
     * Constructs a CustomCalculationResult with the provided values for custom calculations.
     *
     * @param customValue the custom value used in the calculation
     * @param customRiskValue the calculated custom risk value
     * @param customChanceValue the calculated custom chance value
     * @param customDuties the custom duties amount
     * @param tariffRate the applicable tariff rate
     * @param annualCost the total annual cost
     * @param annualRiskCost the annual risk-related cost
     * @param annualChanceCost the annual chance-related cost
     */
    public CustomResult(BigDecimal customValue, BigDecimal customRiskValue, BigDecimal customChanceValue, BigDecimal customDuties, BigDecimal tariffRate, BigDecimal annualCost, BigDecimal annualRiskCost, BigDecimal annualChanceCost) {
        this.customValue = customValue;
        this.customDuties = customDuties;
        this.tariffRate = tariffRate;
        this.annualCost = annualCost;
        this.annualRiskCost = annualRiskCost;
        this.annualChanceCost = annualChanceCost;
        this.customRiskValue = customRiskValue;
        this.customChanceValue = customChanceValue;
    }

    /**
     * @return the custom risk value
     */
    public BigDecimal getCustomRiskValue() {
        return customRiskValue;
    }

    /**
     * @param customRiskValue the custom risk value to set
     */
    public void setCustomRiskValue(BigDecimal customRiskValue) {
        this.customRiskValue = customRiskValue;
    }

    /**
     * @return the custom chance value
     */
    public BigDecimal getCustomChanceValue() {
        return customChanceValue;
    }

    /**
     * @param customChanceValue the custom chance value to set
     */
    public void setCustomChanceValue(BigDecimal customChanceValue) {
        this.customChanceValue = customChanceValue;
    }

    /**
     * @return the annual risk cost
     */
    public BigDecimal getAnnualRiskCost() {
        return annualRiskCost;
    }

    /**
     * @param annualRiskCost the annual risk cost to set
     */
    public void setAnnualRiskCost(BigDecimal annualRiskCost) {
        this.annualRiskCost = annualRiskCost;
    }

    /**
     * @return the annual chance cost
     */
    public BigDecimal getAnnualChanceCost() {
        return annualChanceCost;
    }

    /**
     * @param annualChanceCost the annual chance cost to set
     */
    public void setAnnualChanceCost(BigDecimal annualChanceCost) {
        this.annualChanceCost = annualChanceCost;
    }

    /**
     * @return the custom value
     */
    public BigDecimal getCustomValue() {
        return customValue;
    }

    /**
     * @param customValue the custom value to set
     */
    public void setCustomValue(BigDecimal customValue) {
        this.customValue = customValue;
    }

    /**
     * @return the custom duties
     */
    public BigDecimal getCustomDuties() {
        return customDuties;
    }

    /**
     * @param customDuties the custom duties to set
     */
    public void setCustomDuties(BigDecimal customDuties) {
        this.customDuties = customDuties;
    }

    /**
     * @return the custom rate
     */
    public BigDecimal getTariffRate() {
        return tariffRate;
    }

    /**
     * @param tariffRate the custom rate to set
     */
    public void setTariffRate(BigDecimal tariffRate) {
        this.tariffRate = tariffRate;
    }

    /**
     * @return the annual cost
     */
    public BigDecimal getAnnualCost() {
        return annualCost;
    }

    /**
     * @param annualCost the annual cost to set
     */
    public void setAnnualCost(BigDecimal annualCost) {
        this.annualCost = annualCost;
    }
}
