// 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.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.datalakeanalytics.fluent.models.UpdateDataLakeAnalyticsAccountProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** The parameters that can be used to update an existing Data Lake Analytics account. */
@Fluent
public final class UpdateDataLakeAnalyticsAccountParameters {
    /*
     * The resource tags.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /*
     * The properties that can be updated in an existing Data Lake Analytics account.
     */
    @JsonProperty(value = "properties")
    private UpdateDataLakeAnalyticsAccountProperties innerProperties;

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

    /**
     * Get the tags property: The resource tags.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: The resource tags.
     *
     * @param tags the tags value to set.
     * @return the UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the innerProperties property: The properties that can be updated in an existing Data Lake Analytics account.
     *
     * @return the innerProperties value.
     */
    private UpdateDataLakeAnalyticsAccountProperties innerProperties() {
        return this.innerProperties;
    }

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

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

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

    /**
     * Set the storageAccounts property: The list of Azure Blob storage accounts associated with this account.
     *
     * @param storageAccounts the storageAccounts value to set.
     * @return the UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withStorageAccounts(
        List<UpdateStorageAccountWithAccountParameters> storageAccounts) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withStorageAccounts(storageAccounts);
        return this;
    }

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

    /**
     * Set the computePolicies property: The list of compute policies associated with this account.
     *
     * @param computePolicies the computePolicies value to set.
     * @return the UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withComputePolicies(
        List<UpdateComputePolicyWithAccountParameters> computePolicies) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withComputePolicies(computePolicies);
        return this;
    }

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

    /**
     * Set the firewallRules property: The list of firewall rules associated with this account.
     *
     * @param firewallRules the firewallRules value to set.
     * @return the UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withFirewallRules(
        List<UpdateFirewallRuleWithAccountParameters> firewallRules) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withFirewallRules(firewallRules);
        return this;
    }

    /**
     * Get the firewallState property: The current state of the IP address firewall for this account. Disabling the
     * firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled.
     *
     * @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. Disabling the
     * firewall does not remove existing rules, they will just be ignored until the firewall is re-enabled.
     *
     * @param firewallState the firewallState value to set.
     * @return the UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withFirewallState(FirewallState firewallState) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        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 UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withFirewallAllowAzureIps(
        FirewallAllowAzureIpsState firewallAllowAzureIps) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withFirewallAllowAzureIps(firewallAllowAzureIps);
        return this;
    }

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

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

    /**
     * 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 UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withMaxJobCount(Integer maxJobCount) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withMaxJobCount(maxJobCount);
        return this;
    }

    /**
     * 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 UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withMaxDegreeOfParallelism(Integer maxDegreeOfParallelism) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withMaxDegreeOfParallelism(maxDegreeOfParallelism);
        return this;
    }

    /**
     * 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 UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withMaxDegreeOfParallelismPerJob(
        Integer maxDegreeOfParallelismPerJob) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        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();
    }

    /**
     * Set the minPriorityPerJob property: The minimum supported priority per job for this account.
     *
     * @param minPriorityPerJob the minPriorityPerJob value to set.
     * @return the UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withMinPriorityPerJob(Integer minPriorityPerJob) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withMinPriorityPerJob(minPriorityPerJob);
        return this;
    }

    /**
     * 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 UpdateDataLakeAnalyticsAccountParameters object itself.
     */
    public UpdateDataLakeAnalyticsAccountParameters withQueryStoreRetention(Integer queryStoreRetention) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDataLakeAnalyticsAccountProperties();
        }
        this.innerProperties().withQueryStoreRetention(queryStoreRetention);
        return this;
    }

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