/*
 * 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 parameters that can be used to update an existing Data Lake Analytics
 * account.
 *
 */
class DataLakeAnalyticsAccountUpdateParameters {
  /**
   * Create a DataLakeAnalyticsAccountUpdateParameters.
   * @member {object} [tags] Resource tags
   * @member {number} [maxDegreeOfParallelism] the maximum supported degree of
   * parallelism for this account.
   * @member {number} [queryStoreRetention] the number of days that job
   * metadata is retained.
   * @member {number} [maxJobCount] the maximum supported jobs running under
   * the account at the same time.
   * @member {string} [newTier] the commitment tier to use for next month.
   * Possible values include: 'Consumption', 'Commitment_100AUHours',
   * 'Commitment_500AUHours', 'Commitment_1000AUHours',
   * 'Commitment_5000AUHours', 'Commitment_10000AUHours',
   * 'Commitment_50000AUHours', 'Commitment_100000AUHours',
   * 'Commitment_500000AUHours'
   * @member {string} [firewallState] The current state of the IP address
   * firewall for this Data Lake Analytics account. Possible values include:
   * 'Enabled', 'Disabled'
   * @member {string} [firewallAllowAzureIps] The current state of allowing or
   * disallowing IPs originating within Azure through the firewall. If the
   * firewall is disabled, this is not enforced. Possible values include:
   * 'Enabled', 'Disabled'
   * @member {array} [firewallRules] The list of firewall rules associated with
   * this Data Lake Analytics account.
   * @member {number} [maxDegreeOfParallelismPerJob] the maximum supported
   * degree of parallelism per job for this account.
   * @member {number} [minPriorityPerJob] the minimum supported priority per
   * job for this account.
   * @member {array} [computePolicies] the list of existing compute policies to
   * update in this account.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DataLakeAnalyticsAccountUpdateParameters
   *
   * @returns {object} metadata of DataLakeAnalyticsAccountUpdateParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DataLakeAnalyticsAccountUpdateParameters',
      type: {
        name: 'Composite',
        className: 'DataLakeAnalyticsAccountUpdateParameters',
        modelProperties: {
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          maxDegreeOfParallelism: {
            required: false,
            serializedName: 'properties.maxDegreeOfParallelism',
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          queryStoreRetention: {
            required: false,
            serializedName: 'properties.queryStoreRetention',
            constraints: {
              InclusiveMaximum: 180,
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          maxJobCount: {
            required: false,
            serializedName: 'properties.maxJobCount',
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          newTier: {
            required: false,
            serializedName: 'properties.newTier',
            type: {
              name: 'Enum',
              allowedValues: [ 'Consumption', 'Commitment_100AUHours', 'Commitment_500AUHours', 'Commitment_1000AUHours', 'Commitment_5000AUHours', 'Commitment_10000AUHours', 'Commitment_50000AUHours', 'Commitment_100000AUHours', 'Commitment_500000AUHours' ]
            }
          },
          firewallState: {
            required: false,
            serializedName: 'properties.firewallState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Enabled', 'Disabled' ]
            }
          },
          firewallAllowAzureIps: {
            required: false,
            serializedName: 'properties.firewallAllowAzureIps',
            type: {
              name: 'Enum',
              allowedValues: [ 'Enabled', 'Disabled' ]
            }
          },
          firewallRules: {
            required: false,
            serializedName: 'properties.firewallRules',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'FirewallRuleElementType',
                  type: {
                    name: 'Composite',
                    className: 'FirewallRule'
                  }
              }
            }
          },
          maxDegreeOfParallelismPerJob: {
            required: false,
            serializedName: 'properties.maxDegreeOfParallelismPerJob',
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          minPriorityPerJob: {
            required: false,
            serializedName: 'properties.minPriorityPerJob',
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          computePolicies: {
            required: false,
            serializedName: 'properties.computePolicies',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ComputePolicyElementType',
                  type: {
                    name: 'Composite',
                    className: 'ComputePolicy'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = DataLakeAnalyticsAccountUpdateParameters;
