/*
 * 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';

/**
 * Information about an image store upload session. A session is associated
 * with a relative path in the image store.
 *
 */
class UploadSessionInfo {
  /**
   * Create a UploadSessionInfo.
   * @property {string} [storeRelativePath] The remote location within image
   * store. This path is relative to the image store root.
   * @property {uuid} [sessionId] A unique ID of the upload session. A session
   * ID can be reused only if the session was committed or removed.
   * @property {date} [modifiedDate] The date and time when the upload session
   * was last modified.
   * @property {string} [fileSize] The size in bytes of the uploading file.
   * @property {array} [expectedRanges] List of chunk ranges that image store
   * has not received yet.
   */
  constructor() {
  }

  /**
   * Defines the metadata of UploadSessionInfo
   *
   * @returns {object} metadata of UploadSessionInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'UploadSessionInfo',
      type: {
        name: 'Composite',
        className: 'UploadSessionInfo',
        modelProperties: {
          storeRelativePath: {
            required: false,
            serializedName: 'StoreRelativePath',
            type: {
              name: 'String'
            }
          },
          sessionId: {
            required: false,
            serializedName: 'SessionId',
            type: {
              name: 'String'
            }
          },
          modifiedDate: {
            required: false,
            serializedName: 'ModifiedDate',
            type: {
              name: 'DateTime'
            }
          },
          fileSize: {
            required: false,
            serializedName: 'FileSize',
            type: {
              name: 'String'
            }
          },
          expectedRanges: {
            required: false,
            serializedName: 'ExpectedRanges',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'UploadChunkRangeElementType',
                  type: {
                    name: 'Composite',
                    className: 'UploadChunkRange'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = UploadSessionInfo;
