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

/**
 * Statistics about setup or main entry point  of a code package deployed on a
 * Service Fabric node.
 *
 */
class CodePackageEntryPointStatistics {
  /**
   * Create a CodePackageEntryPointStatistics.
   * @property {string} [lastExitCode] The last exit code of the entry point.
   * @property {date} [lastActivationTime] The last time (in UTC) when Service
   * Fabric attempted to run the entry point.
   * @property {date} [lastExitTime] The last time (in UTC) when the entry
   * point finished running.
   * @property {date} [lastSuccessfulActivationTime] The last time (in UTC)
   * when the entry point ran successfully.
   * @property {date} [lastSuccessfulExitTime] The last time (in UTC) when the
   * entry point finished running gracefully.
   * @property {string} [activationCount] Number of times the entry point has
   * run.
   * @property {string} [activationFailureCount] Number of times the entry
   * point failed to run.
   * @property {string} [continuousActivationFailureCount] Number of times the
   * entry point continuously failed to run.
   * @property {string} [exitCount] Number of times the entry point finished
   * running.
   * @property {string} [exitFailureCount] Number of times the entry point
   * failed to exit gracefully.
   * @property {string} [continuousExitFailureCount] Number of times the entry
   * point continuously failed to exit gracefully.
   */
  constructor() {
  }

  /**
   * Defines the metadata of CodePackageEntryPointStatistics
   *
   * @returns {object} metadata of CodePackageEntryPointStatistics
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CodePackageEntryPointStatistics',
      type: {
        name: 'Composite',
        className: 'CodePackageEntryPointStatistics',
        modelProperties: {
          lastExitCode: {
            required: false,
            serializedName: 'LastExitCode',
            type: {
              name: 'String'
            }
          },
          lastActivationTime: {
            required: false,
            serializedName: 'LastActivationTime',
            type: {
              name: 'DateTime'
            }
          },
          lastExitTime: {
            required: false,
            serializedName: 'LastExitTime',
            type: {
              name: 'DateTime'
            }
          },
          lastSuccessfulActivationTime: {
            required: false,
            serializedName: 'LastSuccessfulActivationTime',
            type: {
              name: 'DateTime'
            }
          },
          lastSuccessfulExitTime: {
            required: false,
            serializedName: 'LastSuccessfulExitTime',
            type: {
              name: 'DateTime'
            }
          },
          activationCount: {
            required: false,
            serializedName: 'ActivationCount',
            type: {
              name: 'String'
            }
          },
          activationFailureCount: {
            required: false,
            serializedName: 'ActivationFailureCount',
            type: {
              name: 'String'
            }
          },
          continuousActivationFailureCount: {
            required: false,
            serializedName: 'ContinuousActivationFailureCount',
            type: {
              name: 'String'
            }
          },
          exitCount: {
            required: false,
            serializedName: 'ExitCount',
            type: {
              name: 'String'
            }
          },
          exitFailureCount: {
            required: false,
            serializedName: 'ExitFailureCount',
            type: {
              name: 'String'
            }
          },
          continuousExitFailureCount: {
            required: false,
            serializedName: 'ContinuousExitFailureCount',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = CodePackageEntryPointStatistics;
