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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterManagerType;
import com.azure.resourcemanager.sqlvirtualmachine.models.ScaleType;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku;
import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** A SQL virtual machine group. */
@Fluent
public final class SqlVirtualMachineGroupInner extends Resource {
    /*
     * Resource properties.
     */
    @JsonProperty(value = "properties")
    private SqlVirtualMachineGroupProperties innerProperties;

    /*
     * Metadata pertaining to creation and last modification of the resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: Resource properties.
     *
     * @return the innerProperties value.
     */
    private SqlVirtualMachineGroupProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

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

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

    /**
     * Get the provisioningState property: Provisioning state to track the async operation status.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the sqlImageOffer property: SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
     *
     * @return the sqlImageOffer value.
     */
    public String sqlImageOffer() {
        return this.innerProperties() == null ? null : this.innerProperties().sqlImageOffer();
    }

    /**
     * Set the sqlImageOffer property: SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
     *
     * @param sqlImageOffer the sqlImageOffer value to set.
     * @return the SqlVirtualMachineGroupInner object itself.
     */
    public SqlVirtualMachineGroupInner withSqlImageOffer(String sqlImageOffer) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SqlVirtualMachineGroupProperties();
        }
        this.innerProperties().withSqlImageOffer(sqlImageOffer);
        return this;
    }

    /**
     * Get the sqlImageSku property: SQL image sku.
     *
     * @return the sqlImageSku value.
     */
    public SqlVmGroupImageSku sqlImageSku() {
        return this.innerProperties() == null ? null : this.innerProperties().sqlImageSku();
    }

    /**
     * Set the sqlImageSku property: SQL image sku.
     *
     * @param sqlImageSku the sqlImageSku value to set.
     * @return the SqlVirtualMachineGroupInner object itself.
     */
    public SqlVirtualMachineGroupInner withSqlImageSku(SqlVmGroupImageSku sqlImageSku) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SqlVirtualMachineGroupProperties();
        }
        this.innerProperties().withSqlImageSku(sqlImageSku);
        return this;
    }

    /**
     * Get the scaleType property: Scale type.
     *
     * @return the scaleType value.
     */
    public ScaleType scaleType() {
        return this.innerProperties() == null ? null : this.innerProperties().scaleType();
    }

    /**
     * Get the clusterManagerType property: Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by
     * the scale type of the group and the OS type.
     *
     * @return the clusterManagerType value.
     */
    public ClusterManagerType clusterManagerType() {
        return this.innerProperties() == null ? null : this.innerProperties().clusterManagerType();
    }

    /**
     * Get the clusterConfiguration property: Cluster type.
     *
     * @return the clusterConfiguration value.
     */
    public ClusterConfiguration clusterConfiguration() {
        return this.innerProperties() == null ? null : this.innerProperties().clusterConfiguration();
    }

    /**
     * Get the wsfcDomainProfile property: Cluster Active Directory domain profile.
     *
     * @return the wsfcDomainProfile value.
     */
    public WsfcDomainProfile wsfcDomainProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().wsfcDomainProfile();
    }

    /**
     * Set the wsfcDomainProfile property: Cluster Active Directory domain profile.
     *
     * @param wsfcDomainProfile the wsfcDomainProfile value to set.
     * @return the SqlVirtualMachineGroupInner object itself.
     */
    public SqlVirtualMachineGroupInner withWsfcDomainProfile(WsfcDomainProfile wsfcDomainProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SqlVirtualMachineGroupProperties();
        }
        this.innerProperties().withWsfcDomainProfile(wsfcDomainProfile);
        return this;
    }

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