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

/** The datastore inventory item. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inventoryType")
@JsonTypeName("Datastore")
@Fluent
public final class DatastoreInventoryItem extends InventoryItemProperties {
    /*
     * Gets or sets Maximum capacity of this datastore, in GBs.
     */
    @JsonProperty(value = "capacityGB")
    private Long capacityGB;

    /*
     * Gets or sets Available space of this datastore, in GBs.
     */
    @JsonProperty(value = "freeSpaceGB")
    private Long freeSpaceGB;

    /**
     * Get the capacityGB property: Gets or sets Maximum capacity of this datastore, in GBs.
     *
     * @return the capacityGB value.
     */
    public Long capacityGB() {
        return this.capacityGB;
    }

    /**
     * Set the capacityGB property: Gets or sets Maximum capacity of this datastore, in GBs.
     *
     * @param capacityGB the capacityGB value to set.
     * @return the DatastoreInventoryItem object itself.
     */
    public DatastoreInventoryItem withCapacityGB(Long capacityGB) {
        this.capacityGB = capacityGB;
        return this;
    }

    /**
     * Get the freeSpaceGB property: Gets or sets Available space of this datastore, in GBs.
     *
     * @return the freeSpaceGB value.
     */
    public Long freeSpaceGB() {
        return this.freeSpaceGB;
    }

    /**
     * Set the freeSpaceGB property: Gets or sets Available space of this datastore, in GBs.
     *
     * @param freeSpaceGB the freeSpaceGB value to set.
     * @return the DatastoreInventoryItem object itself.
     */
    public DatastoreInventoryItem withFreeSpaceGB(Long freeSpaceGB) {
        this.freeSpaceGB = freeSpaceGB;
        return this;
    }

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

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

    /** {@inheritDoc} */
    @Override
    public DatastoreInventoryItem 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();
    }
}
