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

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

import com.azure.core.annotation.Immutable;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.batchai.models.FileType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Properties of the file or directory. */
@JsonFlatten
@Immutable
public class FileInner {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(FileInner.class);

    /*
     * Name of the file.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * Type of the file. Possible values are file and directory.
     */
    @JsonProperty(value = "fileType", access = JsonProperty.Access.WRITE_ONLY)
    private FileType fileType;

    /*
     * URL to download the corresponding file. The downloadUrl is not returned
     * for directories.
     */
    @JsonProperty(value = "downloadUrl", access = JsonProperty.Access.WRITE_ONLY)
    private String downloadUrl;

    /*
     * The time at which the file was last modified.
     */
    @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime lastModified;

    /*
     * The file of the size.
     */
    @JsonProperty(value = "properties.contentLength", access = JsonProperty.Access.WRITE_ONLY)
    private Long contentLength;

    /**
     * Get the name property: Name of the file.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the fileType property: Type of the file. Possible values are file and directory.
     *
     * @return the fileType value.
     */
    public FileType fileType() {
        return this.fileType;
    }

    /**
     * Get the downloadUrl property: URL to download the corresponding file. The downloadUrl is not returned for
     * directories.
     *
     * @return the downloadUrl value.
     */
    public String downloadUrl() {
        return this.downloadUrl;
    }

    /**
     * Get the lastModified property: The time at which the file was last modified.
     *
     * @return the lastModified value.
     */
    public OffsetDateTime lastModified() {
        return this.lastModified;
    }

    /**
     * Get the contentLength property: The file of the size.
     *
     * @return the contentLength value.
     */
    public Long contentLength() {
        return this.contentLength;
    }

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