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

/**
 * Details of the Process Server.
 *
 */
class ProcessServer {
  /**
   * Create a ProcessServer.
   * @member {string} [friendlyName] The Process Server's friendly name.
   * @member {string} [id] The Process Server Id.
   * @member {string} [ipAddress] The IP address of the server.
   * @member {string} [osType] The OS type of the server.
   * @member {string} [agentVersion] The version of the scout component on the
   * server.
   * @member {date} [lastHeartbeat] The last heartbeat received from the
   * server.
   * @member {string} [versionStatus] Version status
   * @member {array} [mobilityServiceUpdates] The list of the mobility service
   * updates available on the Process Server.
   * @member {string} [hostId] The agent generated Id.
   * @member {string} [machineCount] The servers configured with this PS.
   * @member {string} [replicationPairCount] The number of replication pairs
   * configured in this PS.
   * @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} [psServiceStatus] The PS service status.
   * @member {date} [sslCertExpiryDate] The PS SSL cert expiry date.
   * @member {number} [sslCertExpiryRemainingDays] CS SSL cert expiry date.
   * @member {string} [osVersion] OS Version of the process server. Note: This
   * will get populated if user has CS version greater than 9.12.0.0.
   * @member {array} [healthErrors] Health errors.
   * @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() {
  }

  /**
   * Defines the metadata of ProcessServer
   *
   * @returns {object} metadata of ProcessServer
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ProcessServer',
      type: {
        name: 'Composite',
        className: 'ProcessServer',
        modelProperties: {
          friendlyName: {
            required: false,
            serializedName: 'friendlyName',
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          ipAddress: {
            required: false,
            serializedName: 'ipAddress',
            type: {
              name: 'String'
            }
          },
          osType: {
            required: false,
            serializedName: 'osType',
            type: {
              name: 'String'
            }
          },
          agentVersion: {
            required: false,
            serializedName: 'agentVersion',
            type: {
              name: 'String'
            }
          },
          lastHeartbeat: {
            required: false,
            serializedName: 'lastHeartbeat',
            type: {
              name: 'DateTime'
            }
          },
          versionStatus: {
            required: false,
            serializedName: 'versionStatus',
            type: {
              name: 'String'
            }
          },
          mobilityServiceUpdates: {
            required: false,
            serializedName: 'mobilityServiceUpdates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MobilityServiceUpdateElementType',
                  type: {
                    name: 'Composite',
                    className: 'MobilityServiceUpdate'
                  }
              }
            }
          },
          hostId: {
            required: false,
            serializedName: 'hostId',
            type: {
              name: 'String'
            }
          },
          machineCount: {
            required: false,
            serializedName: 'machineCount',
            type: {
              name: 'String'
            }
          },
          replicationPairCount: {
            required: false,
            serializedName: 'replicationPairCount',
            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'
            }
          },
          psServiceStatus: {
            required: false,
            serializedName: 'psServiceStatus',
            type: {
              name: 'String'
            }
          },
          sslCertExpiryDate: {
            required: false,
            serializedName: 'sslCertExpiryDate',
            type: {
              name: 'DateTime'
            }
          },
          sslCertExpiryRemainingDays: {
            required: false,
            serializedName: 'sslCertExpiryRemainingDays',
            type: {
              name: 'Number'
            }
          },
          osVersion: {
            required: false,
            serializedName: 'osVersion',
            type: {
              name: 'String'
            }
          },
          healthErrors: {
            required: false,
            serializedName: 'healthErrors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'HealthErrorElementType',
                  type: {
                    name: 'Composite',
                    className: 'HealthError'
                  }
              }
            }
          },
          agentExpiryDate: {
            required: false,
            serializedName: 'agentExpiryDate',
            type: {
              name: 'DateTime'
            }
          },
          agentVersionDetails: {
            required: false,
            serializedName: 'agentVersionDetails',
            type: {
              name: 'Composite',
              className: 'VersionDetails'
            }
          }
        }
      }
    };
  }
}

module.exports = ProcessServer;
