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

/**
 * VMware provider specific settings
 *
 * @extends models['ConfigurationSettings']
 */
class VMwareVirtualMachineDetails extends models['ConfigurationSettings'] {
  /**
   * Create a VMwareVirtualMachineDetails.
   * @member {string} [agentGeneratedId] The ID generated by the InMage agent
   * after it gets installed on guest. This is the ID to be used during InMage
   * CreateProtection.
   * @member {string} [agentInstalled] The value indicating if InMage scout
   * agent is installed on guest.
   * @member {string} [osType] The OsType installed on VM.
   * @member {string} [agentVersion] The agent version.
   * @member {string} [ipAddress] The IP address.
   * @member {string} [poweredOn] The value indicating whether VM is powered
   * on.
   * @member {string} [vCenterInfrastructureId] The VCenter infrastructure Id.
   * @member {string} [discoveryType] A value inidicating the discovery type of
   * the machine. Value can be vCenter or physical.
   * @member {array} [diskDetails] The disk details.
   * @member {array} [validationErrors] The validation errors.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VMwareVirtualMachineDetails
   *
   * @returns {object} metadata of VMwareVirtualMachineDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VMwareVirtualMachine',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'ConfigurationSettings',
        className: 'VMwareVirtualMachineDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          agentGeneratedId: {
            required: false,
            serializedName: 'agentGeneratedId',
            type: {
              name: 'String'
            }
          },
          agentInstalled: {
            required: false,
            serializedName: 'agentInstalled',
            type: {
              name: 'String'
            }
          },
          osType: {
            required: false,
            serializedName: 'osType',
            type: {
              name: 'String'
            }
          },
          agentVersion: {
            required: false,
            serializedName: 'agentVersion',
            type: {
              name: 'String'
            }
          },
          ipAddress: {
            required: false,
            serializedName: 'ipAddress',
            type: {
              name: 'String'
            }
          },
          poweredOn: {
            required: false,
            serializedName: 'poweredOn',
            type: {
              name: 'String'
            }
          },
          vCenterInfrastructureId: {
            required: false,
            serializedName: 'vCenterInfrastructureId',
            type: {
              name: 'String'
            }
          },
          discoveryType: {
            required: false,
            serializedName: 'discoveryType',
            type: {
              name: 'String'
            }
          },
          diskDetails: {
            required: false,
            serializedName: 'diskDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'InMageDiskDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'InMageDiskDetails'
                  }
              }
            }
          },
          validationErrors: {
            required: false,
            serializedName: 'validationErrors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'HealthErrorElementType',
                  type: {
                    name: 'Composite',
                    className: 'HealthError'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = VMwareVirtualMachineDetails;
