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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.datalakeanalytics.models.DataLakeAnalyticsAccountState;
import com.azure.resourcemanager.datalakeanalytics.models.DataLakeAnalyticsAccountStatus;
import com.azure.resourcemanager.datalakeanalytics.models.DebugDataAccessLevel;
import com.azure.resourcemanager.datalakeanalytics.models.FirewallAllowAzureIpsState;
import com.azure.resourcemanager.datalakeanalytics.models.FirewallState;
import com.azure.resourcemanager.datalakeanalytics.models.HiveMetastore;
import com.azure.resourcemanager.datalakeanalytics.models.TierType;
import com.azure.resourcemanager.datalakeanalytics.models.VirtualNetworkRule;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
 * A Data Lake Analytics account object, containing all information associated with the named Data Lake Analytics
 * account.
 */
@Fluent
public final class DataLakeAnalyticsAccountInner extends Resource {
    /*
     * The properties defined by Data Lake Analytics all properties are specific to each resource provider.
     */
    @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
    private DataLakeAnalyticsAccountProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties defined by Data Lake Analytics all properties are specific to
     * each resource provider.
     *
     * @return the innerProperties value.
     */
    private DataLakeAnalyticsAccountProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public DataLakeAnalyticsAccountInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DataLakeAnalyticsAccountInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the defaultDataLakeStoreAccount property: The default Data Lake Store account associated with this account.
     *
     * @return the defaultDataLakeStoreAccount value.
     */
    public String defaultDataLakeStoreAccount() {
        return this.innerProperties() == null ? null : this.innerProperties().defaultDataLakeStoreAccount();
    }

    /**
     * Get the dataLakeStoreAccounts property: The list of Data Lake Store accounts associated with this account.
     *
     * @return the dataLakeStoreAccounts value.
     */
    public List<DataLakeStoreAccountInformationInner> dataLakeStoreAccounts() {
        return this.innerProperties() == null ? null : this.innerProperties().dataLakeStoreAccounts();
    }

    /**
     * Get the publicDataLakeStoreAccounts property: The list of Data Lake Store accounts associated with this account.
     *
     * @return the publicDataLakeStoreAccounts value.
     */
    public List<DataLakeStoreAccountInformationInner> publicDataLakeStoreAccounts() {
        return this.innerProperties() == null ? null : this.innerProperties().publicDataLakeStoreAccounts();
    }

    /**
     * Set the publicDataLakeStoreAccounts property: The list of Data Lake Store accounts associated with this account.
     *
     * @param publicDataLakeStoreAccounts the publicDataLakeStoreAccounts value to set.
     * @return the DataLakeAnalyticsAccountInner object itself.
     */
    public DataLakeAnalyticsAccountInner withPublicDataLakeStoreAccounts(
        List<DataLakeStoreAccountInformationInner> publicDataLakeStoreAccounts) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withPublicDataLakeStoreAccounts(publicDataLakeStoreAccounts);
        return this;
    }

    /**
     * Get the storageAccounts property: The list of Azure Blob Storage accounts associated with this account.
     *
     * @return the storageAccounts value.
     */
    public List<StorageAccountInformationInner> storageAccounts() {
        return this.innerProperties() == null ? null : this.innerProperties().storageAccounts();
    }

    /**
     * Get the computePolicies property: The list of compute policies associated with this account.
     *
     * @return the computePolicies value.
     */
    public List<ComputePolicyInner> computePolicies() {
        return this.innerProperties() == null ? null : this.innerProperties().computePolicies();
    }

    /**
     * Get the hiveMetastores property: The list of hiveMetastores associated with this account.
     *
     * @return the hiveMetastores value.
     */
    public List<HiveMetastore> hiveMetastores() {
        return this.innerProperties() == null ? null : this.innerProperties().hiveMetastores();
    }

    /**
     * Get the virtualNetworkRules property: The list of virtualNetwork rules associated with this account.
     *
     * @return the virtualNetworkRules value.
     */
    public List<VirtualNetworkRule> virtualNetworkRules() {
        return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkRules();
    }

    /**
     * Get the firewallRules property: The list of firewall rules associated with this account.
     *
     * @return the firewallRules value.
     */
    public List<FirewallRuleInner> firewallRules() {
        return this.innerProperties() == null ? null : this.innerProperties().firewallRules();
    }

    /**
     * Get the firewallState property: The current state of the IP address firewall for this account.
     *
     * @return the firewallState value.
     */
    public FirewallState firewallState() {
        return this.innerProperties() == null ? null : this.innerProperties().firewallState();
    }

    /**
     * Set the firewallState property: The current state of the IP address firewall for this account.
     *
     * @param firewallState the firewallState value to set.
     * @return the DataLakeAnalyticsAccountInner object itself.
     */
    public DataLakeAnalyticsAccountInner withFirewallState(FirewallState firewallState) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withFirewallState(firewallState);
        return this;
    }

    /**
     * Get the firewallAllowAzureIps property: The current state of allowing or disallowing IPs originating within Azure
     * through the firewall. If the firewall is disabled, this is not enforced.
     *
     * @return the firewallAllowAzureIps value.
     */
    public FirewallAllowAzureIpsState firewallAllowAzureIps() {
        return this.innerProperties() == null ? null : this.innerProperties().firewallAllowAzureIps();
    }

    /**
     * Set the firewallAllowAzureIps property: The current state of allowing or disallowing IPs originating within Azure
     * through the firewall. If the firewall is disabled, this is not enforced.
     *
     * @param firewallAllowAzureIps the firewallAllowAzureIps value to set.
     * @return the DataLakeAnalyticsAccountInner object itself.
     */
    public DataLakeAnalyticsAccountInner withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withFirewallAllowAzureIps(firewallAllowAzureIps);
        return this;
    }

    /**
     * Get the newTier property: The commitment tier for the next month.
     *
     * @return the newTier value.
     */
    public TierType newTier() {
        return this.innerProperties() == null ? null : this.innerProperties().newTier();
    }

    /**
     * Set the newTier property: The commitment tier for the next month.
     *
     * @param newTier the newTier value to set.
     * @return the DataLakeAnalyticsAccountInner object itself.
     */
    public DataLakeAnalyticsAccountInner withNewTier(TierType newTier) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withNewTier(newTier);
        return this;
    }

    /**
     * Get the currentTier property: The commitment tier in use for the current month.
     *
     * @return the currentTier value.
     */
    public TierType currentTier() {
        return this.innerProperties() == null ? null : this.innerProperties().currentTier();
    }

    /**
     * Get the maxJobCount property: The maximum supported jobs running under the account at the same time.
     *
     * @return the maxJobCount value.
     */
    public Integer maxJobCount() {
        return this.innerProperties() == null ? null : this.innerProperties().maxJobCount();
    }

    /**
     * Set the maxJobCount property: The maximum supported jobs running under the account at the same time.
     *
     * @param maxJobCount the maxJobCount value to set.
     * @return the DataLakeAnalyticsAccountInner object itself.
     */
    public DataLakeAnalyticsAccountInner withMaxJobCount(Integer maxJobCount) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withMaxJobCount(maxJobCount);
        return this;
    }

    /**
     * Get the maxActiveJobCountPerUser property: The maximum supported active jobs under the account at the same time.
     *
     * @return the maxActiveJobCountPerUser value.
     */
    public Integer maxActiveJobCountPerUser() {
        return this.innerProperties() == null ? null : this.innerProperties().maxActiveJobCountPerUser();
    }

    /**
     * Get the maxQueuedJobCountPerUser property: The maximum supported jobs queued under the account at the same time.
     *
     * @return the maxQueuedJobCountPerUser value.
     */
    public Integer maxQueuedJobCountPerUser() {
        return this.innerProperties() == null ? null : this.innerProperties().maxQueuedJobCountPerUser();
    }

    /**
     * Get the maxJobRunningTimeInMin property: The maximum supported active jobs under the account at the same time.
     *
     * @return the maxJobRunningTimeInMin value.
     */
    public Integer maxJobRunningTimeInMin() {
        return this.innerProperties() == null ? null : this.innerProperties().maxJobRunningTimeInMin();
    }

    /**
     * Get the systemMaxJobCount property: The system defined maximum supported jobs running under the account at the
     * same time, which restricts the maximum number of running jobs the user can set for the account.
     *
     * @return the systemMaxJobCount value.
     */
    public Integer systemMaxJobCount() {
        return this.innerProperties() == null ? null : this.innerProperties().systemMaxJobCount();
    }

    /**
     * Get the maxDegreeOfParallelism property: The maximum supported degree of parallelism for this account.
     *
     * @return the maxDegreeOfParallelism value.
     */
    public Integer maxDegreeOfParallelism() {
        return this.innerProperties() == null ? null : this.innerProperties().maxDegreeOfParallelism();
    }

    /**
     * Set the maxDegreeOfParallelism property: The maximum supported degree of parallelism for this account.
     *
     * @param maxDegreeOfParallelism the maxDegreeOfParallelism value to set.
     * @return the DataLakeAnalyticsAccountInner object itself.
     */
    public DataLakeAnalyticsAccountInner withMaxDegreeOfParallelism(Integer maxDegreeOfParallelism) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withMaxDegreeOfParallelism(maxDegreeOfParallelism);
        return this;
    }

    /**
     * Get the systemMaxDegreeOfParallelism property: The system defined maximum supported degree of parallelism for
     * this account, which restricts the maximum value of parallelism the user can set for the account.
     *
     * @return the systemMaxDegreeOfParallelism value.
     */
    public Integer systemMaxDegreeOfParallelism() {
        return this.innerProperties() == null ? null : this.innerProperties().systemMaxDegreeOfParallelism();
    }

    /**
     * Get the maxDegreeOfParallelismPerJob property: The maximum supported degree of parallelism per job for this
     * account.
     *
     * @return the maxDegreeOfParallelismPerJob value.
     */
    public Integer maxDegreeOfParallelismPerJob() {
        return this.innerProperties() == null ? null : this.innerProperties().maxDegreeOfParallelismPerJob();
    }

    /**
     * Set the maxDegreeOfParallelismPerJob property: The maximum supported degree of parallelism per job for this
     * account.
     *
     * @param maxDegreeOfParallelismPerJob the maxDegreeOfParallelismPerJob value to set.
     * @return the DataLakeAnalyticsAccountInner object itself.
     */
    public DataLakeAnalyticsAccountInner withMaxDegreeOfParallelismPerJob(Integer maxDegreeOfParallelismPerJob) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withMaxDegreeOfParallelismPerJob(maxDegreeOfParallelismPerJob);
        return this;
    }

    /**
     * Get the minPriorityPerJob property: The minimum supported priority per job for this account.
     *
     * @return the minPriorityPerJob value.
     */
    public Integer minPriorityPerJob() {
        return this.innerProperties() == null ? null : this.innerProperties().minPriorityPerJob();
    }

    /**
     * Get the queryStoreRetention property: The number of days that job metadata is retained.
     *
     * @return the queryStoreRetention value.
     */
    public Integer queryStoreRetention() {
        return this.innerProperties() == null ? null : this.innerProperties().queryStoreRetention();
    }

    /**
     * Set the queryStoreRetention property: The number of days that job metadata is retained.
     *
     * @param queryStoreRetention the queryStoreRetention value to set.
     * @return the DataLakeAnalyticsAccountInner object itself.
     */
    public DataLakeAnalyticsAccountInner withQueryStoreRetention(Integer queryStoreRetention) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withQueryStoreRetention(queryStoreRetention);
        return this;
    }

    /**
     * Get the debugDataAccessLevel property: The current state of the DebugDataAccessLevel for this account.
     *
     * @return the debugDataAccessLevel value.
     */
    public DebugDataAccessLevel debugDataAccessLevel() {
        return this.innerProperties() == null ? null : this.innerProperties().debugDataAccessLevel();
    }

    /**
     * Get the accountId property: The unique identifier associated with this Data Lake Analytics account.
     *
     * @return the accountId value.
     */
    public UUID accountId() {
        return this.innerProperties() == null ? null : this.innerProperties().accountId();
    }

    /**
     * Get the provisioningState property: The provisioning status of the Data Lake Analytics account.
     *
     * @return the provisioningState value.
     */
    public DataLakeAnalyticsAccountStatus provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the state property: The state of the Data Lake Analytics account.
     *
     * @return the state value.
     */
    public DataLakeAnalyticsAccountState state() {
        return this.innerProperties() == null ? null : this.innerProperties().state();
    }

    /**
     * Get the creationTime property: The account creation time.
     *
     * @return the creationTime value.
     */
    public OffsetDateTime creationTime() {
        return this.innerProperties() == null ? null : this.innerProperties().creationTime();
    }

    /**
     * Get the lastModifiedTime property: The account last modified time.
     *
     * @return the lastModifiedTime value.
     */
    public OffsetDateTime lastModifiedTime() {
        return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTime();
    }

    /**
     * Get the endpoint property: The full CName endpoint for this account.
     *
     * @return the endpoint value.
     */
    public String endpoint() {
        return this.innerProperties() == null ? null : this.innerProperties().endpoint();
    }

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