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

const models = require('./index');

/**
 * DataBox Disk Job Details.
 *
 * @extends models['JobDetails']
 */
class DataBoxDiskJobDetails extends models['JobDetails'] {
  /**
   * Create a DataBoxDiskJobDetails.
   * @member {object} [preferredDisks] User preference on what size disks are
   * needed for the job. The map is from the disk size in TB to the count. Eg.
   * {2,5} means 5 disks of 2 TB size. Key is string but will be checked
   * against an int.
   * @member {array} [copyProgress] Copy progress per disk.
   * @member {object} [disksAndSizeDetails] Contains the map of disk serial
   * number to the disk size being used for the job. Is returned only after the
   * disks are shipped to the customer.
   * @member {string} [passkey] User entered passkey for DataBox Disk job.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DataBoxDiskJobDetails
   *
   * @returns {object} metadata of DataBoxDiskJobDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DataBoxDisk',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'jobDetailsType',
          clientName: 'jobDetailsType'
        },
        uberParent: 'JobDetails',
        className: 'DataBoxDiskJobDetails',
        modelProperties: {
          expectedDataSizeInTeraBytes: {
            required: false,
            serializedName: 'expectedDataSizeInTeraBytes',
            type: {
              name: 'Number'
            }
          },
          jobStages: {
            required: false,
            readOnly: true,
            serializedName: 'jobStages',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'JobStagesElementType',
                  type: {
                    name: 'Composite',
                    className: 'JobStages'
                  }
              }
            }
          },
          contactDetails: {
            required: true,
            serializedName: 'contactDetails',
            type: {
              name: 'Composite',
              className: 'ContactDetails'
            }
          },
          shippingAddress: {
            required: true,
            serializedName: 'shippingAddress',
            type: {
              name: 'Composite',
              className: 'ShippingAddress'
            }
          },
          deliveryPackage: {
            required: false,
            readOnly: true,
            serializedName: 'deliveryPackage',
            type: {
              name: 'Composite',
              className: 'PackageShippingDetails'
            }
          },
          returnPackage: {
            required: false,
            readOnly: true,
            serializedName: 'returnPackage',
            type: {
              name: 'Composite',
              className: 'PackageShippingDetails'
            }
          },
          destinationAccountDetails: {
            required: true,
            serializedName: 'destinationAccountDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DestinationAccountDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'DestinationAccountDetails'
                  }
              }
            }
          },
          errorDetails: {
            required: false,
            readOnly: true,
            serializedName: 'errorDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'JobErrorDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'JobErrorDetails'
                  }
              }
            }
          },
          preferences: {
            required: false,
            serializedName: 'preferences',
            type: {
              name: 'Composite',
              className: 'Preferences'
            }
          },
          copyLogDetails: {
            required: false,
            readOnly: true,
            serializedName: 'copyLogDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'CopyLogDetailsElementType',
                  type: {
                    name: 'Composite',
                    polymorphicDiscriminator: {
                      serializedName: 'copyLogDetailsType',
                      clientName: 'copyLogDetailsType'
                    },
                    uberParent: 'CopyLogDetails',
                    className: 'CopyLogDetails'
                  }
              }
            }
          },
          reverseShipmentLabelSasKey: {
            required: false,
            readOnly: true,
            serializedName: 'reverseShipmentLabelSasKey',
            type: {
              name: 'String'
            }
          },
          chainOfCustodySasKey: {
            required: false,
            readOnly: true,
            serializedName: 'chainOfCustodySasKey',
            type: {
              name: 'String'
            }
          },
          jobDetailsType: {
            required: true,
            serializedName: 'jobDetailsType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          preferredDisks: {
            required: false,
            serializedName: 'preferredDisks',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'NumberElementType',
                  type: {
                    name: 'Number'
                  }
              }
            }
          },
          copyProgress: {
            required: false,
            readOnly: true,
            serializedName: 'copyProgress',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DataBoxDiskCopyProgressElementType',
                  type: {
                    name: 'Composite',
                    className: 'DataBoxDiskCopyProgress'
                  }
              }
            }
          },
          disksAndSizeDetails: {
            required: false,
            readOnly: true,
            serializedName: 'disksAndSizeDetails',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'NumberElementType',
                  type: {
                    name: 'Number'
                  }
              }
            }
          },
          passkey: {
            required: false,
            serializedName: 'passkey',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = DataBoxDiskJobDetails;
