// 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.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.time.OffsetDateTime;

/** Describes the offer term. */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "Name",
    defaultImpl = OfferTermInfoAutoGenerated.class)
@JsonTypeName("OfferTermInfoAutoGenerated")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "Monetary Credit", value = MonetaryCredit.class),
    @JsonSubTypes.Type(name = "Monetary Commitment", value = MonetaryCommitment.class),
    @JsonSubTypes.Type(name = "Recurring Charge", value = RecurringCharge.class)
})
@Fluent
public class OfferTermInfoAutoGenerated {
    /*
     * Indicates the date from which the offer term is effective.
     */
    @JsonProperty(value = "EffectiveDate")
    private OffsetDateTime effectiveDate;

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

    /**
     * Get the effectiveDate property: Indicates the date from which the offer term is effective.
     *
     * @return the effectiveDate value.
     */
    public OffsetDateTime effectiveDate() {
        return this.effectiveDate;
    }

    /**
     * Set the effectiveDate property: Indicates the date from which the offer term is effective.
     *
     * @param effectiveDate the effectiveDate value to set.
     * @return the OfferTermInfoAutoGenerated object itself.
     */
    public OfferTermInfoAutoGenerated withEffectiveDate(OffsetDateTime effectiveDate) {
        this.effectiveDate = effectiveDate;
        return this;
    }

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