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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.devtestlabs.models.EnvironmentPermission;
import com.azure.resourcemanager.devtestlabs.models.LabAnnouncementProperties;
import com.azure.resourcemanager.devtestlabs.models.LabSupportProperties;
import com.azure.resourcemanager.devtestlabs.models.PremiumDataDisk;
import com.azure.resourcemanager.devtestlabs.models.StorageType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;

/** A lab. */
@Fluent
public final class LabInner extends Resource {
    /*
     * The properties of the resource.
     */
    @JsonProperty(value = "properties")
    private LabProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties of the resource.
     *
     * @return the innerProperties value.
     */
    private LabProperties innerProperties() {
        return this.innerProperties;
    }

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

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

    /**
     * Get the defaultStorageAccount property: The lab's default storage account.
     *
     * @return the defaultStorageAccount value.
     */
    public String defaultStorageAccount() {
        return this.innerProperties() == null ? null : this.innerProperties().defaultStorageAccount();
    }

    /**
     * Get the defaultPremiumStorageAccount property: The lab's default premium storage account.
     *
     * @return the defaultPremiumStorageAccount value.
     */
    public String defaultPremiumStorageAccount() {
        return this.innerProperties() == null ? null : this.innerProperties().defaultPremiumStorageAccount();
    }

    /**
     * Get the artifactsStorageAccount property: The lab's artifact storage account.
     *
     * @return the artifactsStorageAccount value.
     */
    public String artifactsStorageAccount() {
        return this.innerProperties() == null ? null : this.innerProperties().artifactsStorageAccount();
    }

    /**
     * Get the premiumDataDiskStorageAccount property: The lab's premium data disk storage account.
     *
     * @return the premiumDataDiskStorageAccount value.
     */
    public String premiumDataDiskStorageAccount() {
        return this.innerProperties() == null ? null : this.innerProperties().premiumDataDiskStorageAccount();
    }

    /**
     * Get the vaultName property: The lab's Key vault.
     *
     * @return the vaultName value.
     */
    public String vaultName() {
        return this.innerProperties() == null ? null : this.innerProperties().vaultName();
    }

    /**
     * Get the labStorageType property: Type of storage used by the lab. It can be either Premium or Standard. Default
     * is Premium.
     *
     * @return the labStorageType value.
     */
    public StorageType labStorageType() {
        return this.innerProperties() == null ? null : this.innerProperties().labStorageType();
    }

    /**
     * Set the labStorageType property: Type of storage used by the lab. It can be either Premium or Standard. Default
     * is Premium.
     *
     * @param labStorageType the labStorageType value to set.
     * @return the LabInner object itself.
     */
    public LabInner withLabStorageType(StorageType labStorageType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabProperties();
        }
        this.innerProperties().withLabStorageType(labStorageType);
        return this;
    }

    /**
     * Get the mandatoryArtifactsResourceIdsLinux property: The ordered list of artifact resource IDs that should be
     * applied on all Linux VM creations by default, prior to the artifacts specified by the user.
     *
     * @return the mandatoryArtifactsResourceIdsLinux value.
     */
    public List<String> mandatoryArtifactsResourceIdsLinux() {
        return this.innerProperties() == null ? null : this.innerProperties().mandatoryArtifactsResourceIdsLinux();
    }

    /**
     * Set the mandatoryArtifactsResourceIdsLinux property: The ordered list of artifact resource IDs that should be
     * applied on all Linux VM creations by default, prior to the artifacts specified by the user.
     *
     * @param mandatoryArtifactsResourceIdsLinux the mandatoryArtifactsResourceIdsLinux value to set.
     * @return the LabInner object itself.
     */
    public LabInner withMandatoryArtifactsResourceIdsLinux(List<String> mandatoryArtifactsResourceIdsLinux) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabProperties();
        }
        this.innerProperties().withMandatoryArtifactsResourceIdsLinux(mandatoryArtifactsResourceIdsLinux);
        return this;
    }

    /**
     * Get the mandatoryArtifactsResourceIdsWindows property: The ordered list of artifact resource IDs that should be
     * applied on all Windows VM creations by default, prior to the artifacts specified by the user.
     *
     * @return the mandatoryArtifactsResourceIdsWindows value.
     */
    public List<String> mandatoryArtifactsResourceIdsWindows() {
        return this.innerProperties() == null ? null : this.innerProperties().mandatoryArtifactsResourceIdsWindows();
    }

    /**
     * Set the mandatoryArtifactsResourceIdsWindows property: The ordered list of artifact resource IDs that should be
     * applied on all Windows VM creations by default, prior to the artifacts specified by the user.
     *
     * @param mandatoryArtifactsResourceIdsWindows the mandatoryArtifactsResourceIdsWindows value to set.
     * @return the LabInner object itself.
     */
    public LabInner withMandatoryArtifactsResourceIdsWindows(List<String> mandatoryArtifactsResourceIdsWindows) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabProperties();
        }
        this.innerProperties().withMandatoryArtifactsResourceIdsWindows(mandatoryArtifactsResourceIdsWindows);
        return this;
    }

    /**
     * Get the createdDate property: The creation date of the lab.
     *
     * @return the createdDate value.
     */
    public OffsetDateTime createdDate() {
        return this.innerProperties() == null ? null : this.innerProperties().createdDate();
    }

    /**
     * Get the premiumDataDisks property: The setting to enable usage of premium data disks. When its value is
     * 'Enabled', creation of standard or premium data disks is allowed. When its value is 'Disabled', only creation of
     * standard data disks is allowed.
     *
     * @return the premiumDataDisks value.
     */
    public PremiumDataDisk premiumDataDisks() {
        return this.innerProperties() == null ? null : this.innerProperties().premiumDataDisks();
    }

    /**
     * Set the premiumDataDisks property: The setting to enable usage of premium data disks. When its value is
     * 'Enabled', creation of standard or premium data disks is allowed. When its value is 'Disabled', only creation of
     * standard data disks is allowed.
     *
     * @param premiumDataDisks the premiumDataDisks value to set.
     * @return the LabInner object itself.
     */
    public LabInner withPremiumDataDisks(PremiumDataDisk premiumDataDisks) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabProperties();
        }
        this.innerProperties().withPremiumDataDisks(premiumDataDisks);
        return this;
    }

    /**
     * Get the environmentPermission property: The access rights to be granted to the user when provisioning an
     * environment.
     *
     * @return the environmentPermission value.
     */
    public EnvironmentPermission environmentPermission() {
        return this.innerProperties() == null ? null : this.innerProperties().environmentPermission();
    }

    /**
     * Set the environmentPermission property: The access rights to be granted to the user when provisioning an
     * environment.
     *
     * @param environmentPermission the environmentPermission value to set.
     * @return the LabInner object itself.
     */
    public LabInner withEnvironmentPermission(EnvironmentPermission environmentPermission) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabProperties();
        }
        this.innerProperties().withEnvironmentPermission(environmentPermission);
        return this;
    }

    /**
     * Get the announcement property: The properties of any lab announcement associated with this lab.
     *
     * @return the announcement value.
     */
    public LabAnnouncementProperties announcement() {
        return this.innerProperties() == null ? null : this.innerProperties().announcement();
    }

    /**
     * Set the announcement property: The properties of any lab announcement associated with this lab.
     *
     * @param announcement the announcement value to set.
     * @return the LabInner object itself.
     */
    public LabInner withAnnouncement(LabAnnouncementProperties announcement) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabProperties();
        }
        this.innerProperties().withAnnouncement(announcement);
        return this;
    }

    /**
     * Get the support property: The properties of any lab support message associated with this lab.
     *
     * @return the support value.
     */
    public LabSupportProperties support() {
        return this.innerProperties() == null ? null : this.innerProperties().support();
    }

    /**
     * Set the support property: The properties of any lab support message associated with this lab.
     *
     * @param support the support value to set.
     * @return the LabInner object itself.
     */
    public LabInner withSupport(LabSupportProperties support) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabProperties();
        }
        this.innerProperties().withSupport(support);
        return this;
    }

    /**
     * Get the vmCreationResourceGroup property: The resource group in which all new lab virtual machines will be
     * created. To let DevTest Labs manage resource group creation, set this value to null.
     *
     * @return the vmCreationResourceGroup value.
     */
    public String vmCreationResourceGroup() {
        return this.innerProperties() == null ? null : this.innerProperties().vmCreationResourceGroup();
    }

    /**
     * Get the publicIpId property: The public IP address for the lab's load balancer.
     *
     * @return the publicIpId value.
     */
    public String publicIpId() {
        return this.innerProperties() == null ? null : this.innerProperties().publicIpId();
    }

    /**
     * Get the loadBalancerId property: The load balancer used to for lab VMs that use shared IP address.
     *
     * @return the loadBalancerId value.
     */
    public String loadBalancerId() {
        return this.innerProperties() == null ? null : this.innerProperties().loadBalancerId();
    }

    /**
     * Get the networkSecurityGroupId property: The Network Security Group attached to the lab VMs Network interfaces to
     * restrict open ports.
     *
     * @return the networkSecurityGroupId value.
     */
    public String networkSecurityGroupId() {
        return this.innerProperties() == null ? null : this.innerProperties().networkSecurityGroupId();
    }

    /**
     * Get the extendedProperties property: Extended properties of the lab used for experimental features.
     *
     * @return the extendedProperties value.
     */
    public Map<String, String> extendedProperties() {
        return this.innerProperties() == null ? null : this.innerProperties().extendedProperties();
    }

    /**
     * Set the extendedProperties property: Extended properties of the lab used for experimental features.
     *
     * @param extendedProperties the extendedProperties value to set.
     * @return the LabInner object itself.
     */
    public LabInner withExtendedProperties(Map<String, String> extendedProperties) {
        if (this.innerProperties() == null) {
            this.innerProperties = new LabProperties();
        }
        this.innerProperties().withExtendedProperties(extendedProperties);
        return this;
    }

    /**
     * Get the provisioningState property: The provisioning status of the resource.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).
     *
     * @return the uniqueIdentifier value.
     */
    public String uniqueIdentifier() {
        return this.innerProperties() == null ? null : this.innerProperties().uniqueIdentifier();
    }

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