// 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.fasterxml.jackson.annotation.JsonProperty;

/** The details of a account resource. */
@Fluent
public final class AccountResourceInner extends ProxyResource {
    /*
     * The resource-specific properties for this resource.
     */
    @JsonProperty(value = "properties")
    private AccountProperties 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 AccountResourceInner class. */
    public AccountResourceInner() {
    }

    /**
     * Get the innerProperties property: The resource-specific properties for this resource.
     *
     * @return the innerProperties value.
     */
    private AccountProperties 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 AccountResourceInner object itself.
     */
    public AccountResourceInner withOrganizationId(String organizationId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AccountProperties();
        }
        this.innerProperties().withOrganizationId(organizationId);
        return this;
    }

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

    /**
     * Set the accountId property: account id.
     *
     * @param accountId the accountId value to set.
     * @return the AccountResourceInner object itself.
     */
    public AccountResourceInner withAccountId(String accountId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AccountProperties();
        }
        this.innerProperties().withAccountId(accountId);
        return this;
    }

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

    /**
     * Set the accountName property: account name.
     *
     * @param accountName the accountName value to set.
     * @return the AccountResourceInner object itself.
     */
    public AccountResourceInner withAccountName(String accountName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AccountProperties();
        }
        this.innerProperties().withAccountName(accountName);
        return this;
    }

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

    /**
     * Set the region property: region.
     *
     * @param region the region value to set.
     * @return the AccountResourceInner object itself.
     */
    public AccountResourceInner withRegion(String region) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AccountProperties();
        }
        this.innerProperties().withRegion(region);
        return this;
    }

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