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

/**
 * The HDInsight cluster application
 *
 * @extends models['ProxyResource']
 */
class Application extends models['ProxyResource'] {
  /**
   * Create a Application.
   * @property {string} [etag] The ETag for the application
   * @property {object} [tags] The tags for the application.
   * @property {object} [properties] The properties of the application.
   * @property {object} [properties.computeProfile] The list of roles in the
   * cluster.
   * @property {array} [properties.computeProfile.roles] The list of roles in
   * the cluster.
   * @property {array} [properties.installScriptActions] The list of install
   * script actions.
   * @property {array} [properties.uninstallScriptActions] The list of
   * uninstall script actions.
   * @property {array} [properties.httpsEndpoints] The list of application
   * HTTPS endpoints.
   * @property {array} [properties.sshEndpoints] The list of application SSH
   * endpoints.
   * @property {string} [properties.provisioningState] The provisioning state
   * of the application.
   * @property {string} [properties.applicationType] The application type.
   * @property {string} [properties.applicationState] The application state.
   * @property {array} [properties.errors] The list of errors.
   * @property {string} [properties.createdDate] The application create date
   * time.
   * @property {string} [properties.marketplaceIdentifier] The marketplace
   * identifier.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Application
   *
   * @returns {object} metadata of Application
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Application',
      type: {
        name: 'Composite',
        className: 'Application',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'ApplicationProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = Application;
