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

package com.azure.resourcemanager.education.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.education.models.GrantStatus;
import com.azure.resourcemanager.education.models.GrantType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Grant detail properties. */
@Immutable
public final class GrantDetailProperties {
    /*
     * Offer Cap
     */
    @JsonProperty(value = "offerCap", access = JsonProperty.Access.WRITE_ONLY)
    private Amount offerCap;

    /*
     * Grant Effective Date
     */
    @JsonProperty(value = "effectiveDate", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime effectiveDate;

    /*
     * Grant Offer Type
     */
    @JsonProperty(value = "offerType", access = JsonProperty.Access.WRITE_ONLY)
    private GrantType offerType;

    /*
     * Expiration Date
     */
    @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime expirationDate;

    /*
     * Grant status
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private GrantStatus status;

    /*
     * allocated budget
     */
    @JsonProperty(value = "allocatedBudget", access = JsonProperty.Access.WRITE_ONLY)
    private Amount allocatedBudget;

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

    /**
     * Get the offerCap property: Offer Cap.
     *
     * @return the offerCap value.
     */
    public Amount offerCap() {
        return this.offerCap;
    }

    /**
     * Get the effectiveDate property: Grant Effective Date.
     *
     * @return the effectiveDate value.
     */
    public OffsetDateTime effectiveDate() {
        return this.effectiveDate;
    }

    /**
     * Get the offerType property: Grant Offer Type.
     *
     * @return the offerType value.
     */
    public GrantType offerType() {
        return this.offerType;
    }

    /**
     * Get the expirationDate property: Expiration Date.
     *
     * @return the expirationDate value.
     */
    public OffsetDateTime expirationDate() {
        return this.expirationDate;
    }

    /**
     * Get the status property: Grant status.
     *
     * @return the status value.
     */
    public GrantStatus status() {
        return this.status;
    }

    /**
     * Get the allocatedBudget property: allocated budget.
     *
     * @return the allocatedBudget value.
     */
    public Amount allocatedBudget() {
        return this.allocatedBudget;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (offerCap() != null) {
            offerCap().validate();
        }
        if (allocatedBudget() != null) {
            allocatedBudget().validate();
        }
    }
}
