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

/**
 * Contains information about an application in a Batch account.
 *
 * @extends models['ProxyResource']
 */
class Application extends models['ProxyResource'] {
  /**
   * Create a Application.
   * @property {string} [displayName] The display name for the application.
   * @property {boolean} [allowUpdates] A value indicating whether packages
   * within the application may be overwritten using the same version string.
   * @property {string} [defaultVersion] The package to use if a client
   * requests the application but does not specify a version. This property can
   * only be set to the name of an existing package.
   */
  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,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          allowUpdates: {
            required: false,
            serializedName: 'properties.allowUpdates',
            type: {
              name: 'Boolean'
            }
          },
          defaultVersion: {
            required: false,
            serializedName: 'properties.defaultVersion',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Application;
