// 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.ClusterInventoryItem;
import com.azure.resourcemanager.connectedvmware.models.DatastoreInventoryItem;
import com.azure.resourcemanager.connectedvmware.models.HostInventoryItem;
import com.azure.resourcemanager.connectedvmware.models.ResourcePoolInventoryItem;
import com.azure.resourcemanager.connectedvmware.models.VirtualMachineInventoryItem;
import com.azure.resourcemanager.connectedvmware.models.VirtualMachineTemplateInventoryItem;
import com.azure.resourcemanager.connectedvmware.models.VirtualNetworkInventoryItem;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** Defines the resource properties. */
@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "inventoryType",
    defaultImpl = InventoryItemProperties.class)
@JsonTypeName("InventoryItemProperties")
@JsonSubTypes({
    @JsonSubTypes.Type(name = "ResourcePool", value = ResourcePoolInventoryItem.class),
    @JsonSubTypes.Type(name = "VirtualMachine", value = VirtualMachineInventoryItem.class),
    @JsonSubTypes.Type(name = "VirtualMachineTemplate", value = VirtualMachineTemplateInventoryItem.class),
    @JsonSubTypes.Type(name = "VirtualNetwork", value = VirtualNetworkInventoryItem.class),
    @JsonSubTypes.Type(name = "Cluster", value = ClusterInventoryItem.class),
    @JsonSubTypes.Type(name = "Datastore", value = DatastoreInventoryItem.class),
    @JsonSubTypes.Type(name = "Host", value = HostInventoryItem.class)
})
@Fluent
public class InventoryItemProperties {
    /*
     * Gets or sets the tracked resource id corresponding to the inventory resource.
     */
    @JsonProperty(value = "managedResourceId")
    private String managedResourceId;

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

    /*
     * Gets or sets the vCenter Managed Object name for the inventory item.
     */
    @JsonProperty(value = "moName")
    private String moName;

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

    /**
     * Get the managedResourceId property: Gets or sets the tracked resource id corresponding to the inventory resource.
     *
     * @return the managedResourceId value.
     */
    public String managedResourceId() {
        return this.managedResourceId;
    }

    /**
     * Set the managedResourceId property: Gets or sets the tracked resource id corresponding to the inventory resource.
     *
     * @param managedResourceId the managedResourceId value to set.
     * @return the InventoryItemProperties object itself.
     */
    public InventoryItemProperties withManagedResourceId(String managedResourceId) {
        this.managedResourceId = managedResourceId;
        return this;
    }

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

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

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

    /**
     * Set the moName property: Gets or sets the vCenter Managed Object name for the inventory item.
     *
     * @param moName the moName value to set.
     * @return the InventoryItemProperties object itself.
     */
    public InventoryItemProperties withMoName(String moName) {
        this.moName = moName;
        return this;
    }

    /**
     * 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() {
    }
}
