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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.hybridcontainerservice.models.StorageSpacesExtendedLocation;
import com.azure.resourcemanager.hybridcontainerservice.models.StorageSpacesProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The storageSpaces resource definition. */
@Fluent
public final class StorageSpacesInner extends Resource {
    /*
     * HybridAKSStorageSpec defines the desired state of HybridAKSStorage
     */
    @JsonProperty(value = "properties")
    private StorageSpacesProperties properties;

    /*
     * Metadata pertaining to creation and last modification of the resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /*
     * The extendedLocation property.
     */
    @JsonProperty(value = "extendedLocation")
    private StorageSpacesExtendedLocation extendedLocation;

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

    /**
     * Get the properties property: HybridAKSStorageSpec defines the desired state of HybridAKSStorage.
     *
     * @return the properties value.
     */
    public StorageSpacesProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: HybridAKSStorageSpec defines the desired state of HybridAKSStorage.
     *
     * @param properties the properties value to set.
     * @return the StorageSpacesInner object itself.
     */
    public StorageSpacesInner withProperties(StorageSpacesProperties properties) {
        this.properties = properties;
        return this;
    }

    /**
     * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the extendedLocation property: The extendedLocation property.
     *
     * @return the extendedLocation value.
     */
    public StorageSpacesExtendedLocation extendedLocation() {
        return this.extendedLocation;
    }

    /**
     * Set the extendedLocation property: The extendedLocation property.
     *
     * @param extendedLocation the extendedLocation value to set.
     * @return the StorageSpacesInner object itself.
     */
    public StorageSpacesInner withExtendedLocation(StorageSpacesExtendedLocation extendedLocation) {
        this.extendedLocation = extendedLocation;
        return this;
    }

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

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

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