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

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the Application class.
 * @constructor
 * Contains information about an application in a Batch account.
 * @member {string} [id] A string that uniquely identifies the application
 * within the account.
 * 
 * @member {string} [displayName] The display name for the application.
 * 
 * @member {array} [packages] The list of packages under this application.
 * 
 * @member {boolean} [allowUpdates] A value indicating whether packages within
 * the application may be overwritten using the same version string.
 * 
 * @member {string} [defaultVersion] The package to use if a client requests
 * the application but does not specify a version.
 * 
 */
function Application() {
}

/**
 * Defines the metadata of Application
 *
 * @returns {object} metadata of Application
 *
 */
Application.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'Application',
    type: {
      name: 'Composite',
      className: 'Application',
      modelProperties: {
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        displayName: {
          required: false,
          serializedName: 'displayName',
          type: {
            name: 'String'
          }
        },
        packages: {
          required: false,
          serializedName: 'packages',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'ApplicationPackageElementType',
                type: {
                  name: 'Composite',
                  className: 'ApplicationPackage'
                }
            }
          }
        },
        allowUpdates: {
          required: false,
          serializedName: 'allowUpdates',
          type: {
            name: 'Boolean'
          }
        },
        defaultVersion: {
          required: false,
          serializedName: 'defaultVersion',
          type: {
            name: 'String'
          }
        }
      }
    }
  };
};

module.exports = Application;
