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

/**
 * Store the fabric details specific to the VMware fabric.
 *
 * @extends models['FabricSpecificDetails']
 */
class VMwareDetails extends models['FabricSpecificDetails'] {
  /**
   * Create a VMwareDetails.
   * @member {array} [processServers] The list of Process Servers associated
   * with the fabric.
   * @member {array} [masterTargetServers] The list of Master Target servers
   * associated with the fabric.
   * @member {array} [runAsAccounts] The list of run as accounts created on the
   * server.
   * @member {string} [replicationPairCount] The number of replication pairs
   * configured in this CS.
   * @member {string} [processServerCount] The number of process servers.
   * @member {string} [agentCount] The number of source and target servers
   * configured to talk to this CS.
   * @member {string} [protectedServers] The number of protected servers.
   * @member {string} [systemLoad] The percentage of the system load.
   * @member {string} [systemLoadStatus] The system load status.
   * @member {string} [cpuLoad] The percentage of the CPU load.
   * @member {string} [cpuLoadStatus] The CPU load status.
   * @member {number} [totalMemoryInBytes] The total memory.
   * @member {number} [availableMemoryInBytes] The available memory.
   * @member {string} [memoryUsageStatus] The memory usage status.
   * @member {number} [totalSpaceInBytes] The total space.
   * @member {number} [availableSpaceInBytes] The available space.
   * @member {string} [spaceUsageStatus] The space usage status.
   * @member {string} [webLoad] The web load.
   * @member {string} [webLoadStatus] The web load status.
   * @member {string} [databaseServerLoad] The database server load.
   * @member {string} [databaseServerLoadStatus] The database server load
   * status.
   * @member {string} [csServiceStatus] The CS service status.
   * @member {string} [ipAddress] The IP address.
   * @member {string} [agentVersion] The agent Version.
   * @member {string} [hostName] The host name.
   * @member {date} [lastHeartbeat] The last heartbeat received from CS server.
   * @member {string} [versionStatus] Version status
   * @member {date} [sslCertExpiryDate] CS SSL cert expiry date.
   * @member {number} [sslCertExpiryRemainingDays] CS SSL cert expiry date.
   * @member {string} [psTemplateVersion] PS template version.
   * @member {date} [agentExpiryDate] Agent expiry date.
   * @member {object} [agentVersionDetails] The agent version details.
   * @member {string} [agentVersionDetails.version] The agent version.
   * @member {date} [agentVersionDetails.expiryDate] Version expiry date.
   * @member {string} [agentVersionDetails.status] A value indicating whether
   * security update required. Possible values include: 'Supported',
   * 'NotSupported', 'Deprecated', 'UpdateRequired', 'SecurityUpdateRequired'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VMwareDetails
   *
   * @returns {object} metadata of VMwareDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VMware',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'FabricSpecificDetails',
        className: 'VMwareDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          processServers: {
            required: false,
            serializedName: 'processServers',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ProcessServerElementType',
                  type: {
                    name: 'Composite',
                    className: 'ProcessServer'
                  }
              }
            }
          },
          masterTargetServers: {
            required: false,
            serializedName: 'masterTargetServers',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MasterTargetServerElementType',
                  type: {
                    name: 'Composite',
                    className: 'MasterTargetServer'
                  }
              }
            }
          },
          runAsAccounts: {
            required: false,
            serializedName: 'runAsAccounts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RunAsAccountElementType',
                  type: {
                    name: 'Composite',
                    className: 'RunAsAccount'
                  }
              }
            }
          },
          replicationPairCount: {
            required: false,
            serializedName: 'replicationPairCount',
            type: {
              name: 'String'
            }
          },
          processServerCount: {
            required: false,
            serializedName: 'processServerCount',
            type: {
              name: 'String'
            }
          },
          agentCount: {
            required: false,
            serializedName: 'agentCount',
            type: {
              name: 'String'
            }
          },
          protectedServers: {
            required: false,
            serializedName: 'protectedServers',
            type: {
              name: 'String'
            }
          },
          systemLoad: {
            required: false,
            serializedName: 'systemLoad',
            type: {
              name: 'String'
            }
          },
          systemLoadStatus: {
            required: false,
            serializedName: 'systemLoadStatus',
            type: {
              name: 'String'
            }
          },
          cpuLoad: {
            required: false,
            serializedName: 'cpuLoad',
            type: {
              name: 'String'
            }
          },
          cpuLoadStatus: {
            required: false,
            serializedName: 'cpuLoadStatus',
            type: {
              name: 'String'
            }
          },
          totalMemoryInBytes: {
            required: false,
            serializedName: 'totalMemoryInBytes',
            type: {
              name: 'Number'
            }
          },
          availableMemoryInBytes: {
            required: false,
            serializedName: 'availableMemoryInBytes',
            type: {
              name: 'Number'
            }
          },
          memoryUsageStatus: {
            required: false,
            serializedName: 'memoryUsageStatus',
            type: {
              name: 'String'
            }
          },
          totalSpaceInBytes: {
            required: false,
            serializedName: 'totalSpaceInBytes',
            type: {
              name: 'Number'
            }
          },
          availableSpaceInBytes: {
            required: false,
            serializedName: 'availableSpaceInBytes',
            type: {
              name: 'Number'
            }
          },
          spaceUsageStatus: {
            required: false,
            serializedName: 'spaceUsageStatus',
            type: {
              name: 'String'
            }
          },
          webLoad: {
            required: false,
            serializedName: 'webLoad',
            type: {
              name: 'String'
            }
          },
          webLoadStatus: {
            required: false,
            serializedName: 'webLoadStatus',
            type: {
              name: 'String'
            }
          },
          databaseServerLoad: {
            required: false,
            serializedName: 'databaseServerLoad',
            type: {
              name: 'String'
            }
          },
          databaseServerLoadStatus: {
            required: false,
            serializedName: 'databaseServerLoadStatus',
            type: {
              name: 'String'
            }
          },
          csServiceStatus: {
            required: false,
            serializedName: 'csServiceStatus',
            type: {
              name: 'String'
            }
          },
          ipAddress: {
            required: false,
            serializedName: 'ipAddress',
            type: {
              name: 'String'
            }
          },
          agentVersion: {
            required: false,
            serializedName: 'agentVersion',
            type: {
              name: 'String'
            }
          },
          hostName: {
            required: false,
            serializedName: 'hostName',
            type: {
              name: 'String'
            }
          },
          lastHeartbeat: {
            required: false,
            serializedName: 'lastHeartbeat',
            type: {
              name: 'DateTime'
            }
          },
          versionStatus: {
            required: false,
            serializedName: 'versionStatus',
            type: {
              name: 'String'
            }
          },
          sslCertExpiryDate: {
            required: false,
            serializedName: 'sslCertExpiryDate',
            type: {
              name: 'DateTime'
            }
          },
          sslCertExpiryRemainingDays: {
            required: false,
            serializedName: 'sslCertExpiryRemainingDays',
            type: {
              name: 'Number'
            }
          },
          psTemplateVersion: {
            required: false,
            serializedName: 'psTemplateVersion',
            type: {
              name: 'String'
            }
          },
          agentExpiryDate: {
            required: false,
            serializedName: 'agentExpiryDate',
            type: {
              name: 'DateTime'
            }
          },
          agentVersionDetails: {
            required: false,
            serializedName: 'agentVersionDetails',
            type: {
              name: 'Composite',
              className: 'VersionDetails'
            }
          }
        }
      }
    };
  }
}

module.exports = VMwareDetails;
