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

package com.azure.resourcemanager.billingbenefits.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Savings plans list summary. */
@Fluent
public final class SavingsPlanSummary {
    /*
     * This property has value 'summary'
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * The roll up count summary of savings plans in each state
     */
    @JsonProperty(value = "value")
    private SavingsPlanSummaryCount value;

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

    /**
     * Get the name property: This property has value 'summary'.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the value property: The roll up count summary of savings plans in each state.
     *
     * @return the value value.
     */
    public SavingsPlanSummaryCount value() {
        return this.value;
    }

    /**
     * Set the value property: The roll up count summary of savings plans in each state.
     *
     * @param value the value value to set.
     * @return the SavingsPlanSummary object itself.
     */
    public SavingsPlanSummary withValue(SavingsPlanSummaryCount value) {
        this.value = value;
        return this;
    }

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