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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.synapse.models.LanguageExtensionsList;
import com.azure.resourcemanager.synapse.models.OptimizedAutoscale;
import com.azure.resourcemanager.synapse.models.ResourceProvisioningState;
import com.azure.resourcemanager.synapse.models.State;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Class representing the Kusto pool properties. */
@Fluent
public final class KustoPoolProperties {
    /*
     * The state of the resource.
     */
    @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
    private State state;

    /*
     * The provisioned state of the resource.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ResourceProvisioningState provisioningState;

    /*
     * The Kusto Pool URI.
     */
    @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY)
    private String uri;

    /*
     * The Kusto Pool data ingestion URI.
     */
    @JsonProperty(value = "dataIngestionUri", access = JsonProperty.Access.WRITE_ONLY)
    private String dataIngestionUri;

    /*
     * The reason for the Kusto Pool's current state.
     */
    @JsonProperty(value = "stateReason", access = JsonProperty.Access.WRITE_ONLY)
    private String stateReason;

    /*
     * Optimized auto scale definition.
     */
    @JsonProperty(value = "optimizedAutoscale")
    private OptimizedAutoscale optimizedAutoscale;

    /*
     * A boolean value that indicates if the streaming ingest is enabled.
     */
    @JsonProperty(value = "enableStreamingIngest")
    private Boolean enableStreamingIngest;

    /*
     * A boolean value that indicates if the purge operations are enabled.
     */
    @JsonProperty(value = "enablePurge")
    private Boolean enablePurge;

    /*
     * List of the Kusto Pool's language extensions.
     */
    @JsonProperty(value = "languageExtensions", access = JsonProperty.Access.WRITE_ONLY)
    private LanguageExtensionsList languageExtensions;

    /*
     * The workspace unique identifier.
     */
    @JsonProperty(value = "workspaceUID")
    private String workspaceUid;

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

    /**
     * Get the state property: The state of the resource.
     *
     * @return the state value.
     */
    public State state() {
        return this.state;
    }

    /**
     * Get the provisioningState property: The provisioned state of the resource.
     *
     * @return the provisioningState value.
     */
    public ResourceProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the uri property: The Kusto Pool URI.
     *
     * @return the uri value.
     */
    public String uri() {
        return this.uri;
    }

    /**
     * Get the dataIngestionUri property: The Kusto Pool data ingestion URI.
     *
     * @return the dataIngestionUri value.
     */
    public String dataIngestionUri() {
        return this.dataIngestionUri;
    }

    /**
     * Get the stateReason property: The reason for the Kusto Pool's current state.
     *
     * @return the stateReason value.
     */
    public String stateReason() {
        return this.stateReason;
    }

    /**
     * Get the optimizedAutoscale property: Optimized auto scale definition.
     *
     * @return the optimizedAutoscale value.
     */
    public OptimizedAutoscale optimizedAutoscale() {
        return this.optimizedAutoscale;
    }

    /**
     * Set the optimizedAutoscale property: Optimized auto scale definition.
     *
     * @param optimizedAutoscale the optimizedAutoscale value to set.
     * @return the KustoPoolProperties object itself.
     */
    public KustoPoolProperties withOptimizedAutoscale(OptimizedAutoscale optimizedAutoscale) {
        this.optimizedAutoscale = optimizedAutoscale;
        return this;
    }

    /**
     * Get the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is enabled.
     *
     * @return the enableStreamingIngest value.
     */
    public Boolean enableStreamingIngest() {
        return this.enableStreamingIngest;
    }

    /**
     * Set the enableStreamingIngest property: A boolean value that indicates if the streaming ingest is enabled.
     *
     * @param enableStreamingIngest the enableStreamingIngest value to set.
     * @return the KustoPoolProperties object itself.
     */
    public KustoPoolProperties withEnableStreamingIngest(Boolean enableStreamingIngest) {
        this.enableStreamingIngest = enableStreamingIngest;
        return this;
    }

    /**
     * Get the enablePurge property: A boolean value that indicates if the purge operations are enabled.
     *
     * @return the enablePurge value.
     */
    public Boolean enablePurge() {
        return this.enablePurge;
    }

    /**
     * Set the enablePurge property: A boolean value that indicates if the purge operations are enabled.
     *
     * @param enablePurge the enablePurge value to set.
     * @return the KustoPoolProperties object itself.
     */
    public KustoPoolProperties withEnablePurge(Boolean enablePurge) {
        this.enablePurge = enablePurge;
        return this;
    }

    /**
     * Get the languageExtensions property: List of the Kusto Pool's language extensions.
     *
     * @return the languageExtensions value.
     */
    public LanguageExtensionsList languageExtensions() {
        return this.languageExtensions;
    }

    /**
     * Get the workspaceUid property: The workspace unique identifier.
     *
     * @return the workspaceUid value.
     */
    public String workspaceUid() {
        return this.workspaceUid;
    }

    /**
     * Set the workspaceUid property: The workspace unique identifier.
     *
     * @param workspaceUid the workspaceUid value to set.
     * @return the KustoPoolProperties object itself.
     */
    public KustoPoolProperties withWorkspaceUid(String workspaceUid) {
        this.workspaceUid = workspaceUid;
        return this;
    }

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