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

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Container for data asset versions. */
@Fluent
public final class DataContainerProperties extends AssetContainer {
    /*
     * [Required] Specifies the type of data.
     */
    @JsonProperty(value = "dataType", required = true)
    private DataType dataType;

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

    /**
     * Get the dataType property: [Required] Specifies the type of data.
     *
     * @return the dataType value.
     */
    public DataType dataType() {
        return this.dataType;
    }

    /**
     * Set the dataType property: [Required] Specifies the type of data.
     *
     * @param dataType the dataType value to set.
     * @return the DataContainerProperties object itself.
     */
    public DataContainerProperties withDataType(DataType dataType) {
        this.dataType = dataType;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DataContainerProperties withIsArchived(Boolean isArchived) {
        super.withIsArchived(isArchived);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DataContainerProperties withDescription(String description) {
        super.withDescription(description);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public DataContainerProperties withProperties(Map<String, String> properties) {
        super.withProperties(properties);
        return this;
    }

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

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (dataType() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property dataType in model DataContainerProperties"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(DataContainerProperties.class);
}
