// 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.time.OffsetDateTime;

/** Indicates a recurring charge is present for this offer. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "Name")
@JsonTypeName("Recurring Charge")
@Fluent
public final class RecurringCharge extends OfferTermInfoAutoGenerated {
    /*
     * The amount of recurring charge as per the offer term.
     */
    @JsonProperty(value = "RecurringCharge")
    private Integer recurringCharge;

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

    /**
     * Get the recurringCharge property: The amount of recurring charge as per the offer term.
     *
     * @return the recurringCharge value.
     */
    public Integer recurringCharge() {
        return this.recurringCharge;
    }

    /**
     * Set the recurringCharge property: The amount of recurring charge as per the offer term.
     *
     * @param recurringCharge the recurringCharge value to set.
     * @return the RecurringCharge object itself.
     */
    public RecurringCharge withRecurringCharge(Integer recurringCharge) {
        this.recurringCharge = recurringCharge;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public RecurringCharge 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();
    }
}
