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

/**
 * Information about a Service Fabric application.
 *
 */
class ApplicationInfo {
  /**
   * Create a ApplicationInfo.
   * @property {string} [id] The identity of the application. This is an
   * encoded representation of the application name. This is used in the REST
   * APIs to identify the application resource.
   * Starting in version 6.0, hierarchical names are delimited with the "\~"
   * character. For example, if the application name is "fabric:/myapp/app1",
   * the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1"
   * in previous versions.
   * @property {string} [name] The name of the application, including the
   * 'fabric:' URI scheme.
   * @property {string} [typeName] The application type name as defined in the
   * application manifest.
   * @property {string} [typeVersion] The version of the application type as
   * defined in the application manifest.
   * @property {string} [status] The status of the application. Possible values
   * include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'
   * @property {array} [parameters] List of application parameters with
   * overridden values from their default values specified in the application
   * manifest.
   * @property {string} [healthState] The health state of a Service Fabric
   * entity such as Cluster, Node, Application, Service, Partition, Replica
   * etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error',
   * 'Unknown'
   * @property {string} [applicationDefinitionKind] The mechanism used to
   * define a Service Fabric application. Possible values include: 'Invalid',
   * 'ServiceFabricApplicationDescription', 'Compose'
   */
  constructor() {
  }

  /**
   * Defines the metadata of ApplicationInfo
   *
   * @returns {object} metadata of ApplicationInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationInfo',
      type: {
        name: 'Composite',
        className: 'ApplicationInfo',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'Id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'Name',
            type: {
              name: 'String'
            }
          },
          typeName: {
            required: false,
            serializedName: 'TypeName',
            type: {
              name: 'String'
            }
          },
          typeVersion: {
            required: false,
            serializedName: 'TypeVersion',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'Status',
            type: {
              name: 'String'
            }
          },
          parameters: {
            required: false,
            serializedName: 'Parameters',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplicationParameterElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplicationParameter'
                  }
              }
            }
          },
          healthState: {
            required: false,
            serializedName: 'HealthState',
            type: {
              name: 'String'
            }
          },
          applicationDefinitionKind: {
            required: false,
            serializedName: 'ApplicationDefinitionKind',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ApplicationInfo;
