// 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.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.newrelicobservability.models.BillingSource;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The details of a Organization resource. */
@Fluent
public final class OrganizationResourceInner extends ProxyResource {
    /*
     * The resource-specific properties for this resource.
     */
    @JsonProperty(value = "properties")
    private OrganizationProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: The resource-specific properties for this resource.
     *
     * @return the innerProperties value.
     */
    private OrganizationProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the organizationId property: organization id.
     *
     * @return the organizationId value.
     */
    public String organizationId() {
        return this.innerProperties() == null ? null : this.innerProperties().organizationId();
    }

    /**
     * Set the organizationId property: organization id.
     *
     * @param organizationId the organizationId value to set.
     * @return the OrganizationResourceInner object itself.
     */
    public OrganizationResourceInner withOrganizationId(String organizationId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OrganizationProperties();
        }
        this.innerProperties().withOrganizationId(organizationId);
        return this;
    }

    /**
     * Get the organizationName property: organization name.
     *
     * @return the organizationName value.
     */
    public String organizationName() {
        return this.innerProperties() == null ? null : this.innerProperties().organizationName();
    }

    /**
     * Set the organizationName property: organization name.
     *
     * @param organizationName the organizationName value to set.
     * @return the OrganizationResourceInner object itself.
     */
    public OrganizationResourceInner withOrganizationName(String organizationName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OrganizationProperties();
        }
        this.innerProperties().withOrganizationName(organizationName);
        return this;
    }

    /**
     * Get the billingSource property: Billing source.
     *
     * @return the billingSource value.
     */
    public BillingSource billingSource() {
        return this.innerProperties() == null ? null : this.innerProperties().billingSource();
    }

    /**
     * Set the billingSource property: Billing source.
     *
     * @param billingSource the billingSource value to set.
     * @return the OrganizationResourceInner object itself.
     */
    public OrganizationResourceInner withBillingSource(BillingSource billingSource) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OrganizationProperties();
        }
        this.innerProperties().withBillingSource(billingSource);
        return this;
    }

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