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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.connectedvmware.fluent.models.InventoryItemProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;

/** The VM inventory item. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inventoryType")
@JsonTypeName("VirtualMachine")
@Fluent
public final class VirtualMachineInventoryItem extends InventoryItemProperties {
    /*
     * Gets or sets the type of the os.
     */
    @JsonProperty(value = "osType")
    private OsType osType;

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

    /*
     * Gets or sets the nic ip addresses.
     */
    @JsonProperty(value = "ipAddresses")
    private List<String> ipAddresses;

    /*
     * Gets or sets the folder path of the vm.
     */
    @JsonProperty(value = "folderPath")
    private String folderPath;

    /*
     * Host inventory resource details.
     */
    @JsonProperty(value = "host")
    private InventoryItemDetails host;

    /*
     * ResourcePool inventory resource details.
     */
    @JsonProperty(value = "resourcePool")
    private InventoryItemDetails resourcePool;

    /*
     * Gets or sets the instance uuid of the vm.
     */
    @JsonProperty(value = "instanceUuid")
    private String instanceUuid;

    /*
     * Gets or sets the SMBIOS UUID of the vm.
     */
    @JsonProperty(value = "smbiosUuid")
    private String smbiosUuid;

    /*
     * Gets the power state of the virtual machine.
     */
    @JsonProperty(value = "powerState", access = JsonProperty.Access.WRITE_ONLY)
    private String powerState;

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

    /*
     * 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;

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

    /**
     * Set the osType property: Gets or sets the type of the os.
     *
     * @param osType the osType value to set.
     * @return the VirtualMachineInventoryItem object itself.
     */
    public VirtualMachineInventoryItem withOsType(OsType osType) {
        this.osType = osType;
        return this;
    }

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

    /**
     * Set the osName property: Gets or sets os name.
     *
     * @param osName the osName value to set.
     * @return the VirtualMachineInventoryItem object itself.
     */
    public VirtualMachineInventoryItem withOsName(String osName) {
        this.osName = osName;
        return this;
    }

    /**
     * Get the ipAddresses property: Gets or sets the nic ip addresses.
     *
     * @return the ipAddresses value.
     */
    public List<String> ipAddresses() {
        return this.ipAddresses;
    }

    /**
     * Set the ipAddresses property: Gets or sets the nic ip addresses.
     *
     * @param ipAddresses the ipAddresses value to set.
     * @return the VirtualMachineInventoryItem object itself.
     */
    public VirtualMachineInventoryItem withIpAddresses(List<String> ipAddresses) {
        this.ipAddresses = ipAddresses;
        return this;
    }

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

    /**
     * Set the folderPath property: Gets or sets the folder path of the vm.
     *
     * @param folderPath the folderPath value to set.
     * @return the VirtualMachineInventoryItem object itself.
     */
    public VirtualMachineInventoryItem withFolderPath(String folderPath) {
        this.folderPath = folderPath;
        return this;
    }

    /**
     * Get the host property: Host inventory resource details.
     *
     * @return the host value.
     */
    public InventoryItemDetails host() {
        return this.host;
    }

    /**
     * Set the host property: Host inventory resource details.
     *
     * @param host the host value to set.
     * @return the VirtualMachineInventoryItem object itself.
     */
    public VirtualMachineInventoryItem withHost(InventoryItemDetails host) {
        this.host = host;
        return this;
    }

    /**
     * Get the resourcePool property: ResourcePool inventory resource details.
     *
     * @return the resourcePool value.
     */
    public InventoryItemDetails resourcePool() {
        return this.resourcePool;
    }

    /**
     * Set the resourcePool property: ResourcePool inventory resource details.
     *
     * @param resourcePool the resourcePool value to set.
     * @return the VirtualMachineInventoryItem object itself.
     */
    public VirtualMachineInventoryItem withResourcePool(InventoryItemDetails resourcePool) {
        this.resourcePool = resourcePool;
        return this;
    }

    /**
     * Get the instanceUuid property: Gets or sets the instance uuid of the vm.
     *
     * @return the instanceUuid value.
     */
    public String instanceUuid() {
        return this.instanceUuid;
    }

    /**
     * Set the instanceUuid property: Gets or sets the instance uuid of the vm.
     *
     * @param instanceUuid the instanceUuid value to set.
     * @return the VirtualMachineInventoryItem object itself.
     */
    public VirtualMachineInventoryItem withInstanceUuid(String instanceUuid) {
        this.instanceUuid = instanceUuid;
        return this;
    }

    /**
     * Get the smbiosUuid property: Gets or sets the SMBIOS UUID of the vm.
     *
     * @return the smbiosUuid value.
     */
    public String smbiosUuid() {
        return this.smbiosUuid;
    }

    /**
     * Set the smbiosUuid property: Gets or sets the SMBIOS UUID of the vm.
     *
     * @param smbiosUuid the smbiosUuid value to set.
     * @return the VirtualMachineInventoryItem object itself.
     */
    public VirtualMachineInventoryItem withSmbiosUuid(String smbiosUuid) {
        this.smbiosUuid = smbiosUuid;
        return this;
    }

    /**
     * Get the powerState property: Gets the power state of the virtual machine.
     *
     * @return the powerState value.
     */
    public String powerState() {
        return this.powerState;
    }

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

    /**
     * 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;
    }

    /** {@inheritDoc} */
    @Override
    public VirtualMachineInventoryItem withManagedResourceId(String managedResourceId) {
        super.withManagedResourceId(managedResourceId);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public VirtualMachineInventoryItem withMoRefId(String moRefId) {
        super.withMoRefId(moRefId);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public VirtualMachineInventoryItem withMoName(String moName) {
        super.withMoName(moName);
        return this;
    }

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