// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.commerce.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.UUID;

/** Indicates that this is a monetary credit offer. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Name")
@JsonTypeName("Monetary Credit")
@Fluent
public final class MonetaryCredit extends OfferTermInfoAutoGenerated {
    /*
     * The amount of credit provided under the terms of the given offer level.
     */
    @JsonProperty(value = "Credit")
    private BigDecimal credit;

    /*
     * An array of meter ids that are excluded from the given offer terms.
     */
    @JsonProperty(value = "ExcludedMeterIds")
    private List<UUID> excludedMeterIds;

    /** Creates an instance of MonetaryCredit class. */
    public MonetaryCredit() {
    }

    /**
     * Get the credit property: The amount of credit provided under the terms of the given offer level.
     *
     * @return the credit value.
     */
    public BigDecimal credit() {
        return this.credit;
    }

    /**
     * Set the credit property: The amount of credit provided under the terms of the given offer level.
     *
     * @param credit the credit value to set.
     * @return the MonetaryCredit object itself.
     */
    public MonetaryCredit withCredit(BigDecimal credit) {
        this.credit = credit;
        return this;
    }

    /**
     * Get the excludedMeterIds property: An array of meter ids that are excluded from the given offer terms.
     *
     * @return the excludedMeterIds value.
     */
    public List<UUID> excludedMeterIds() {
        return this.excludedMeterIds;
    }

    /**
     * Set the excludedMeterIds property: An array of meter ids that are excluded from the given offer terms.
     *
     * @param excludedMeterIds the excludedMeterIds value to set.
     * @return the MonetaryCredit object itself.
     */
    public MonetaryCredit withExcludedMeterIds(List<UUID> excludedMeterIds) {
        this.excludedMeterIds = excludedMeterIds;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public MonetaryCredit withEffectiveDate(OffsetDateTime effectiveDate) {
        super.withEffectiveDate(effectiveDate);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
