/*
 * 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 Job Details
 *
 * @extends models['JobDetails']
 */
class DataBoxJobDetails extends models['JobDetails'] {
  /**
   * Create a DataBoxJobDetails.
   * @member {array} [copyProgress] Copy progress per storage account.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DataBoxJobDetails
   *
   * @returns {object} metadata of DataBoxJobDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DataBox',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'jobDetailsType',
          clientName: 'jobDetailsType'
        },
        uberParent: 'JobDetails',
        className: 'DataBoxJobDetails',
        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'
            }
          },
          copyProgress: {
            required: false,
            readOnly: true,
            serializedName: 'copyProgress',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'CopyProgressElementType',
                  type: {
                    name: 'Composite',
                    className: 'CopyProgress'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = DataBoxJobDetails;
