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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.connectedvmware.models.FirmwareType;
import com.azure.resourcemanager.connectedvmware.models.NetworkInterface;
import com.azure.resourcemanager.connectedvmware.models.OsType;
import com.azure.resourcemanager.connectedvmware.models.ResourceStatus;
import com.azure.resourcemanager.connectedvmware.models.VirtualDisk;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Defines the resource properties. */
@Fluent
public final class VirtualMachineTemplateProperties {
    /*
     * Gets or sets a unique identifier for this resource.
     */
    @JsonProperty(value = "uuid", access = JsonProperty.Access.WRITE_ONLY)
    private String uuid;

    /*
     * Gets or sets the ARM Id of the vCenter resource in which this template resides.
     */
    @JsonProperty(value = "vCenterId")
    private String vCenterId;

    /*
     * Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine
     * template.
     */
    @JsonProperty(value = "moRefId")
    private String moRefId;

    /*
     * Gets or sets the inventory Item ID for the virtual machine template.
     */
    @JsonProperty(value = "inventoryItemId")
    private String inventoryItemId;

    /*
     * Gets or sets the vCenter Managed Object name for the virtual machine template.
     */
    @JsonProperty(value = "moName", access = JsonProperty.Access.WRITE_ONLY)
    private String moName;

    /*
     * Gets or sets memory size in MBs for the template.
     */
    @JsonProperty(value = "memorySizeMB", access = JsonProperty.Access.WRITE_ONLY)
    private Integer memorySizeMB;

    /*
     * Gets or sets the number of vCPUs for the template.
     */
    @JsonProperty(value = "numCPUs", access = JsonProperty.Access.WRITE_ONLY)
    private Integer numCPUs;

    /*
     * Gets or sets the number of cores per socket for the template.
     * Defaults to 1 if unspecified.
     */
    @JsonProperty(value = "numCoresPerSocket", access = JsonProperty.Access.WRITE_ONLY)
    private Integer numCoresPerSocket;

    /*
     * Gets or sets the type of the os.
     */
    @JsonProperty(value = "osType", access = JsonProperty.Access.WRITE_ONLY)
    private OsType osType;

    /*
     * Gets or sets os name.
     */
    @JsonProperty(value = "osName", access = JsonProperty.Access.WRITE_ONLY)
    private String osName;

    /*
     * Gets or sets the folder path of the template.
     */
    @JsonProperty(value = "folderPath", access = JsonProperty.Access.WRITE_ONLY)
    private String folderPath;

    /*
     * Gets or sets the network interfaces of the template.
     */
    @JsonProperty(value = "networkInterfaces", access = JsonProperty.Access.WRITE_ONLY)
    private List<NetworkInterface> networkInterfaces;

    /*
     * Gets or sets the disks the template.
     */
    @JsonProperty(value = "disks", access = JsonProperty.Access.WRITE_ONLY)
    private List<VirtualDisk> disks;

    /*
     * Gets the name of the corresponding resource in Kubernetes.
     */
    @JsonProperty(value = "customResourceName", access = JsonProperty.Access.WRITE_ONLY)
    private String customResourceName;

    /*
     * Gets or sets the current version status of VMware Tools installed in the guest operating system.
     */
    @JsonProperty(value = "toolsVersionStatus", access = JsonProperty.Access.WRITE_ONLY)
    private String toolsVersionStatus;

    /*
     * Gets or sets the current version of VMware Tools.
     */
    @JsonProperty(value = "toolsVersion", access = JsonProperty.Access.WRITE_ONLY)
    private String toolsVersion;

    /*
     * Firmware type
     */
    @JsonProperty(value = "firmwareType", access = JsonProperty.Access.WRITE_ONLY)
    private FirmwareType firmwareType;

    /*
     * The resource status information.
     */
    @JsonProperty(value = "statuses", access = JsonProperty.Access.WRITE_ONLY)
    private List<ResourceStatus> statuses;

    /*
     * Gets or sets the provisioning state.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningState;

    /**
     * Get the uuid property: Gets or sets a unique identifier for this resource.
     *
     * @return the uuid value.
     */
    public String uuid() {
        return this.uuid;
    }

    /**
     * Get the vCenterId property: Gets or sets the ARM Id of the vCenter resource in which this template resides.
     *
     * @return the vCenterId value.
     */
    public String vCenterId() {
        return this.vCenterId;
    }

    /**
     * Set the vCenterId property: Gets or sets the ARM Id of the vCenter resource in which this template resides.
     *
     * @param vCenterId the vCenterId value to set.
     * @return the VirtualMachineTemplateProperties object itself.
     */
    public VirtualMachineTemplateProperties withVCenterId(String vCenterId) {
        this.vCenterId = vCenterId;
        return this;
    }

    /**
     * Get the moRefId property: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine
     * template.
     *
     * @return the moRefId value.
     */
    public String moRefId() {
        return this.moRefId;
    }

    /**
     * Set the moRefId property: Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine
     * template.
     *
     * @param moRefId the moRefId value to set.
     * @return the VirtualMachineTemplateProperties object itself.
     */
    public VirtualMachineTemplateProperties withMoRefId(String moRefId) {
        this.moRefId = moRefId;
        return this;
    }

    /**
     * Get the inventoryItemId property: Gets or sets the inventory Item ID for the virtual machine template.
     *
     * @return the inventoryItemId value.
     */
    public String inventoryItemId() {
        return this.inventoryItemId;
    }

    /**
     * Set the inventoryItemId property: Gets or sets the inventory Item ID for the virtual machine template.
     *
     * @param inventoryItemId the inventoryItemId value to set.
     * @return the VirtualMachineTemplateProperties object itself.
     */
    public VirtualMachineTemplateProperties withInventoryItemId(String inventoryItemId) {
        this.inventoryItemId = inventoryItemId;
        return this;
    }

    /**
     * Get the moName property: Gets or sets the vCenter Managed Object name for the virtual machine template.
     *
     * @return the moName value.
     */
    public String moName() {
        return this.moName;
    }

    /**
     * Get the memorySizeMB property: Gets or sets memory size in MBs for the template.
     *
     * @return the memorySizeMB value.
     */
    public Integer memorySizeMB() {
        return this.memorySizeMB;
    }

    /**
     * Get the numCPUs property: Gets or sets the number of vCPUs for the template.
     *
     * @return the numCPUs value.
     */
    public Integer numCPUs() {
        return this.numCPUs;
    }

    /**
     * Get the numCoresPerSocket property: Gets or sets the number of cores per socket for the template. Defaults to 1
     * if unspecified.
     *
     * @return the numCoresPerSocket value.
     */
    public Integer numCoresPerSocket() {
        return this.numCoresPerSocket;
    }

    /**
     * Get the osType property: Gets or sets the type of the os.
     *
     * @return the osType value.
     */
    public OsType osType() {
        return this.osType;
    }

    /**
     * Get the osName property: Gets or sets os name.
     *
     * @return the osName value.
     */
    public String osName() {
        return this.osName;
    }

    /**
     * Get the folderPath property: Gets or sets the folder path of the template.
     *
     * @return the folderPath value.
     */
    public String folderPath() {
        return this.folderPath;
    }

    /**
     * Get the networkInterfaces property: Gets or sets the network interfaces of the template.
     *
     * @return the networkInterfaces value.
     */
    public List<NetworkInterface> networkInterfaces() {
        return this.networkInterfaces;
    }

    /**
     * Get the disks property: Gets or sets the disks the template.
     *
     * @return the disks value.
     */
    public List<VirtualDisk> disks() {
        return this.disks;
    }

    /**
     * Get the customResourceName property: Gets the name of the corresponding resource in Kubernetes.
     *
     * @return the customResourceName value.
     */
    public String customResourceName() {
        return this.customResourceName;
    }

    /**
     * Get the toolsVersionStatus property: Gets or sets the current version status of VMware Tools installed in the
     * guest operating system.
     *
     * @return the toolsVersionStatus value.
     */
    public String toolsVersionStatus() {
        return this.toolsVersionStatus;
    }

    /**
     * Get the toolsVersion property: Gets or sets the current version of VMware Tools.
     *
     * @return the toolsVersion value.
     */
    public String toolsVersion() {
        return this.toolsVersion;
    }

    /**
     * Get the firmwareType property: Firmware type.
     *
     * @return the firmwareType value.
     */
    public FirmwareType firmwareType() {
        return this.firmwareType;
    }

    /**
     * Get the statuses property: The resource status information.
     *
     * @return the statuses value.
     */
    public List<ResourceStatus> statuses() {
        return this.statuses;
    }

    /**
     * Get the provisioningState property: Gets or sets the provisioning state.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (networkInterfaces() != null) {
            networkInterfaces().forEach(e -> e.validate());
        }
        if (disks() != null) {
            disks().forEach(e -> e.validate());
        }
        if (statuses() != null) {
            statuses().forEach(e -> e.validate());
        }
    }
}
