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

/**
 * Runtime information of a container instance.
 *
 */
class ContainerInstanceView {
  /**
   * Create a ContainerInstanceView.
   * @member {number} [restartCount] The number of times the container has been
   * restarted.
   * @member {object} [currentState] Current container instance state.
   * @member {string} [currentState.state] The state of this container
   * @member {date} [currentState.startTime] Date/time when the container state
   * started.
   * @member {string} [currentState.exitCode] The container exit code.
   * @member {date} [currentState.finishTime] Date/time when the container
   * state finished.
   * @member {string} [currentState.detailStatus] Human-readable status of this
   * state.
   * @member {object} [previousState] Previous container instance state.
   * @member {string} [previousState.state] The state of this container
   * @member {date} [previousState.startTime] Date/time when the container
   * state started.
   * @member {string} [previousState.exitCode] The container exit code.
   * @member {date} [previousState.finishTime] Date/time when the container
   * state finished.
   * @member {string} [previousState.detailStatus] Human-readable status of
   * this state.
   * @member {array} [events] The events of this container instance.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ContainerInstanceView
   *
   * @returns {object} metadata of ContainerInstanceView
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ContainerInstanceView',
      type: {
        name: 'Composite',
        className: 'ContainerInstanceView',
        modelProperties: {
          restartCount: {
            required: false,
            serializedName: 'restartCount',
            type: {
              name: 'Number'
            }
          },
          currentState: {
            required: false,
            serializedName: 'currentState',
            type: {
              name: 'Composite',
              className: 'ContainerState'
            }
          },
          previousState: {
            required: false,
            serializedName: 'previousState',
            type: {
              name: 'Composite',
              className: 'ContainerState'
            }
          },
          events: {
            required: false,
            serializedName: 'events',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ContainerEventElementType',
                  type: {
                    name: 'Composite',
                    className: 'ContainerEvent'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ContainerInstanceView;
