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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.newrelicobservability.models.AccountCreationSource;
import com.azure.resourcemanager.newrelicobservability.models.OrgCreationSource;
import com.azure.resourcemanager.newrelicobservability.models.PlanData;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Plan details. */
@Fluent
public final class PlanDataProperties {
    /*
     * Plan details
     */
    @JsonProperty(value = "planData")
    private PlanData planData;

    /*
     * Source of org creation
     */
    @JsonProperty(value = "orgCreationSource")
    private OrgCreationSource orgCreationSource;

    /*
     * Source of account creation
     */
    @JsonProperty(value = "accountCreationSource")
    private AccountCreationSource accountCreationSource;

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

    /**
     * Get the planData property: Plan details.
     *
     * @return the planData value.
     */
    public PlanData planData() {
        return this.planData;
    }

    /**
     * Set the planData property: Plan details.
     *
     * @param planData the planData value to set.
     * @return the PlanDataProperties object itself.
     */
    public PlanDataProperties withPlanData(PlanData planData) {
        this.planData = planData;
        return this;
    }

    /**
     * Get the orgCreationSource property: Source of org creation.
     *
     * @return the orgCreationSource value.
     */
    public OrgCreationSource orgCreationSource() {
        return this.orgCreationSource;
    }

    /**
     * Set the orgCreationSource property: Source of org creation.
     *
     * @param orgCreationSource the orgCreationSource value to set.
     * @return the PlanDataProperties object itself.
     */
    public PlanDataProperties withOrgCreationSource(OrgCreationSource orgCreationSource) {
        this.orgCreationSource = orgCreationSource;
        return this;
    }

    /**
     * Get the accountCreationSource property: Source of account creation.
     *
     * @return the accountCreationSource value.
     */
    public AccountCreationSource accountCreationSource() {
        return this.accountCreationSource;
    }

    /**
     * Set the accountCreationSource property: Source of account creation.
     *
     * @param accountCreationSource the accountCreationSource value to set.
     * @return the PlanDataProperties object itself.
     */
    public PlanDataProperties withAccountCreationSource(AccountCreationSource accountCreationSource) {
        this.accountCreationSource = accountCreationSource;
        return this;
    }

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