/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * Properties of the file or directory.
 *
 */
class File {
  /**
   * Create a File.
   * @member {string} [name] Name. Name of the file.
   * @member {string} [fileType] File type. Type of the file. Possible values
   * are file and directory. Possible values include: 'file', 'directory'
   * @member {string} [downloadUrl] Download URL. URL to download the
   * corresponding file. The downloadUrl is not returned for directories.
   * @member {date} [lastModified] Last modified time. The time at which the
   * file was last modified.
   * @member {number} [contentLength] Content length. The file of the size.
   */
  constructor() {
  }

  /**
   * Defines the metadata of File
   *
   * @returns {object} metadata of File
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'File',
      type: {
        name: 'Composite',
        className: 'File',
        modelProperties: {
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          fileType: {
            required: false,
            readOnly: true,
            serializedName: 'fileType',
            type: {
              name: 'String'
            }
          },
          downloadUrl: {
            required: false,
            readOnly: true,
            serializedName: 'downloadUrl',
            type: {
              name: 'String'
            }
          },
          lastModified: {
            required: false,
            readOnly: true,
            serializedName: 'properties.lastModified',
            type: {
              name: 'DateTime'
            }
          },
          contentLength: {
            required: false,
            readOnly: true,
            serializedName: 'properties.contentLength',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = File;
