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

/**
 * VMM fabric provider specific VM settings.
 *
 * @extends models['ConfigurationSettings']
 */
class VmmVirtualMachineDetails extends models['ConfigurationSettings'] {
  /**
   * Create a VmmVirtualMachineDetails.
   * @member {string} [sourceItemId] The source id of the object.
   * @member {string} [generation] The id of the object in fabric.
   * @member {object} [osDetails] The Last replication time.
   * @member {string} [osDetails.osType] VM Disk details.
   * @member {string} [osDetails.productType] Product type.
   * @member {string} [osDetails.osEdition] The OSEdition.
   * @member {string} [osDetails.oSVersion] The OS Version.
   * @member {string} [osDetails.oSMajorVersion] The OS Major Version.
   * @member {string} [osDetails.oSMinorVersion] The OS Minor Version.
   * @member {array} [diskDetails] The Last successful failover time.
   * @member {string} [hasPhysicalDisk] A value indicating whether the VM has a
   * physical disk attached. String value of {SrsDataContract.PresenceStatus}
   * enum. Possible values include: 'Unknown', 'Present', 'NotPresent'
   * @member {string} [hasFibreChannelAdapter] A value indicating whether the
   * VM has a fibre channel adapter attached. String value of
   * {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown',
   * 'Present', 'NotPresent'
   * @member {string} [hasSharedVhd] A value indicating whether the VM has a
   * shared VHD attached. String value of {SrsDataContract.PresenceStatus}
   * enum. Possible values include: 'Unknown', 'Present', 'NotPresent'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VmmVirtualMachineDetails
   *
   * @returns {object} metadata of VmmVirtualMachineDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VmmVirtualMachine',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'ConfigurationSettings',
        className: 'VmmVirtualMachineDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          sourceItemId: {
            required: false,
            serializedName: 'sourceItemId',
            type: {
              name: 'String'
            }
          },
          generation: {
            required: false,
            serializedName: 'generation',
            type: {
              name: 'String'
            }
          },
          osDetails: {
            required: false,
            serializedName: 'osDetails',
            type: {
              name: 'Composite',
              className: 'OSDetails'
            }
          },
          diskDetails: {
            required: false,
            serializedName: 'diskDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DiskDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'DiskDetails'
                  }
              }
            }
          },
          hasPhysicalDisk: {
            required: false,
            serializedName: 'hasPhysicalDisk',
            type: {
              name: 'String'
            }
          },
          hasFibreChannelAdapter: {
            required: false,
            serializedName: 'hasFibreChannelAdapter',
            type: {
              name: 'String'
            }
          },
          hasSharedVhd: {
            required: false,
            serializedName: 'hasSharedVhd',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = VmmVirtualMachineDetails;
