// 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.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Defines an Aml Instance DataMount. */
@Fluent
public final class ComputeInstanceDataMount {
    /*
     * Source of the ComputeInstance data mount.
     */
    @JsonProperty(value = "source")
    private String source;

    /*
     * Data source type.
     */
    @JsonProperty(value = "sourceType")
    private SourceType sourceType;

    /*
     * name of the ComputeInstance data mount.
     */
    @JsonProperty(value = "mountName")
    private String mountName;

    /*
     * Mount Action.
     */
    @JsonProperty(value = "mountAction")
    private MountAction mountAction;

    /*
     * who this data mount created by.
     */
    @JsonProperty(value = "createdBy")
    private String createdBy;

    /*
     * Path of this data mount.
     */
    @JsonProperty(value = "mountPath")
    private String mountPath;

    /*
     * Mount state.
     */
    @JsonProperty(value = "mountState")
    private MountState mountState;

    /*
     * Mounted time.
     *
     * The time when the disk mounted.
     */
    @JsonProperty(value = "mountedOn")
    private OffsetDateTime mountedOn;

    /*
     * Error of this data mount.
     */
    @JsonProperty(value = "error")
    private String error;

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

    /**
     * Get the source property: Source of the ComputeInstance data mount.
     *
     * @return the source value.
     */
    public String source() {
        return this.source;
    }

    /**
     * Set the source property: Source of the ComputeInstance data mount.
     *
     * @param source the source value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withSource(String source) {
        this.source = source;
        return this;
    }

    /**
     * Get the sourceType property: Data source type.
     *
     * @return the sourceType value.
     */
    public SourceType sourceType() {
        return this.sourceType;
    }

    /**
     * Set the sourceType property: Data source type.
     *
     * @param sourceType the sourceType value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withSourceType(SourceType sourceType) {
        this.sourceType = sourceType;
        return this;
    }

    /**
     * Get the mountName property: name of the ComputeInstance data mount.
     *
     * @return the mountName value.
     */
    public String mountName() {
        return this.mountName;
    }

    /**
     * Set the mountName property: name of the ComputeInstance data mount.
     *
     * @param mountName the mountName value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withMountName(String mountName) {
        this.mountName = mountName;
        return this;
    }

    /**
     * Get the mountAction property: Mount Action.
     *
     * @return the mountAction value.
     */
    public MountAction mountAction() {
        return this.mountAction;
    }

    /**
     * Set the mountAction property: Mount Action.
     *
     * @param mountAction the mountAction value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withMountAction(MountAction mountAction) {
        this.mountAction = mountAction;
        return this;
    }

    /**
     * Get the createdBy property: who this data mount created by.
     *
     * @return the createdBy value.
     */
    public String createdBy() {
        return this.createdBy;
    }

    /**
     * Set the createdBy property: who this data mount created by.
     *
     * @param createdBy the createdBy value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withCreatedBy(String createdBy) {
        this.createdBy = createdBy;
        return this;
    }

    /**
     * Get the mountPath property: Path of this data mount.
     *
     * @return the mountPath value.
     */
    public String mountPath() {
        return this.mountPath;
    }

    /**
     * Set the mountPath property: Path of this data mount.
     *
     * @param mountPath the mountPath value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withMountPath(String mountPath) {
        this.mountPath = mountPath;
        return this;
    }

    /**
     * Get the mountState property: Mount state.
     *
     * @return the mountState value.
     */
    public MountState mountState() {
        return this.mountState;
    }

    /**
     * Set the mountState property: Mount state.
     *
     * @param mountState the mountState value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withMountState(MountState mountState) {
        this.mountState = mountState;
        return this;
    }

    /**
     * Get the mountedOn property: Mounted time.
     *
     * <p>The time when the disk mounted.
     *
     * @return the mountedOn value.
     */
    public OffsetDateTime mountedOn() {
        return this.mountedOn;
    }

    /**
     * Set the mountedOn property: Mounted time.
     *
     * <p>The time when the disk mounted.
     *
     * @param mountedOn the mountedOn value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withMountedOn(OffsetDateTime mountedOn) {
        this.mountedOn = mountedOn;
        return this;
    }

    /**
     * Get the error property: Error of this data mount.
     *
     * @return the error value.
     */
    public String error() {
        return this.error;
    }

    /**
     * Set the error property: Error of this data mount.
     *
     * @param error the error value to set.
     * @return the ComputeInstanceDataMount object itself.
     */
    public ComputeInstanceDataMount withError(String error) {
        this.error = error;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
