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

/**
 * Represents a server to be created.
 *
 */
class ServerForCreate {
  /**
   * Create a ServerForCreate.
   * @property {object} [sku] The SKU (pricing tier) of the server.
   * @property {string} [sku.name] The name of the sku, typically, tier +
   * family + cores, e.g. B_Gen4_1, GP_Gen5_8.
   * @property {string} [sku.tier] The tier of the particular SKU, e.g. Basic.
   * Possible values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized'
   * @property {number} [sku.capacity] The scale up/out capacity, representing
   * server's compute units.
   * @property {string} [sku.size] The size code, to be interpreted by resource
   * as appropriate.
   * @property {string} [sku.family] The family of hardware.
   * @property {object} properties Properties of the server.
   * @property {string} [properties.version] Server version. Possible values
   * include: '9.5', '9.6', '10', '10.0', '10.2'
   * @property {string} [properties.sslEnforcement] Enable ssl enforcement or
   * not when connect to server. Possible values include: 'Enabled', 'Disabled'
   * @property {object} [properties.storageProfile] Storage profile of a
   * server.
   * @property {number} [properties.storageProfile.backupRetentionDays] Backup
   * retention days for the server.
   * @property {string} [properties.storageProfile.geoRedundantBackup] Enable
   * Geo-redundant or not for server backup. Possible values include:
   * 'Enabled', 'Disabled'
   * @property {number} [properties.storageProfile.storageMB] Max storage
   * allowed for a server.
   * @property {string} [properties.createMode] Polymorphic Discriminator
   * @property {string} location The location the resource resides in.
   * @property {object} [tags] Application-specific metadata in the form of
   * key-value pairs.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ServerForCreate
   *
   * @returns {object} metadata of ServerForCreate
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ServerForCreate',
      type: {
        name: 'Composite',
        className: 'ServerForCreate',
        modelProperties: {
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          },
          properties: {
            required: true,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'createMode',
                clientName: 'createMode'
              },
              uberParent: 'ServerPropertiesForCreate',
              className: 'ServerPropertiesForCreate'
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ServerForCreate;
