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

/**
 * Provision request specification
 *
 */
class AnalysisServicesServerUpdateParameters {
  /**
   * Create a AnalysisServicesServerUpdateParameters.
   * @member {object} [sku] The SKU of the Analysis Services resource.
   * @member {string} [sku.name] Name of the SKU level.
   * @member {string} [sku.tier] The name of the Azure pricing tier to which
   * the SKU applies. Possible values include: 'Development', 'Basic',
   * 'Standard'
   * @member {number} [sku.capacity] The number of instances in the read only
   * query pool.
   * @member {object} [tags] Key-value pairs of additional provisioning
   * properties.
   * @member {object} [asAdministrators] A collection of AS server
   * administrators
   * @member {array} [asAdministrators.members] An array of administrator user
   * identities.
   * @member {string} [backupBlobContainerUri] The SAS container URI to the
   * backup container.
   * @member {object} [gatewayDetails] The gateway details configured for the
   * AS server.
   * @member {string} [gatewayDetails.gatewayResourceId] Gateway resource to be
   * associated with the server.
   * @member {string} [gatewayDetails.gatewayObjectId] Gateway object id from
   * in the DMTS cluster for the gateway resource.
   * @member {string} [gatewayDetails.dmtsClusterUri] Uri of the DMTS cluster.
   * @member {object} [ipV4FirewallSettings] The firewall settings for the AS
   * server.
   * @member {array} [ipV4FirewallSettings.firewallRules] An array of firewall
   * rules.
   * @member {string} [ipV4FirewallSettings.enablePowerBIService] The indicator
   * of enableing PBI service.
   * @member {string} [querypoolConnectionMode] How the read-write server's
   * participation in the query pool is controlled.<br/>It can have the
   * following values: <ul><li>readOnly - indicates that the read-write server
   * is intended not to participate in query operations</li><li>all - indicates
   * that the read-write server can participate in query
   * operations</li></ul>Specifying readOnly when capacity is 1 results in
   * error. Possible values include: 'All', 'ReadOnly'. Default value: 'All' .
   */
  constructor() {
  }

  /**
   * Defines the metadata of AnalysisServicesServerUpdateParameters
   *
   * @returns {object} metadata of AnalysisServicesServerUpdateParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AnalysisServicesServerUpdateParameters',
      type: {
        name: 'Composite',
        className: 'AnalysisServicesServerUpdateParameters',
        modelProperties: {
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'ResourceSku'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          asAdministrators: {
            required: false,
            serializedName: 'properties.asAdministrators',
            type: {
              name: 'Composite',
              className: 'ServerAdministrators'
            }
          },
          backupBlobContainerUri: {
            required: false,
            serializedName: 'properties.backupBlobContainerUri',
            type: {
              name: 'String'
            }
          },
          gatewayDetails: {
            required: false,
            serializedName: 'properties.gatewayDetails',
            type: {
              name: 'Composite',
              className: 'GatewayDetails'
            }
          },
          ipV4FirewallSettings: {
            required: false,
            serializedName: 'properties.ipV4FirewallSettings',
            type: {
              name: 'Composite',
              className: 'IPv4FirewallSettings'
            }
          },
          querypoolConnectionMode: {
            required: false,
            serializedName: 'properties.querypoolConnectionMode',
            defaultValue: 'All',
            type: {
              name: 'Enum',
              allowedValues: [ 'All', 'ReadOnly' ]
            }
          }
        }
      }
    };
  }
}

module.exports = AnalysisServicesServerUpdateParameters;
