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

/**
 * A Data Lake Analytics account object, containing all information associated
 * with the named Data Lake Analytics account.
 *
 * @extends models['Resource']
 */
class DataLakeAnalyticsAccount extends models['Resource'] {
  /**
   * Create a DataLakeAnalyticsAccount.
   * @member {string} [provisioningState] the provisioning status of the Data
   * Lake Analytics account. Possible values include: 'Failed', 'Creating',
   * 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting',
   * 'Deleted', 'Undeleting', 'Canceled'
   * @member {string} [state] the state of the Data Lake Analytics account.
   * Possible values include: 'Active', 'Suspended'
   * @member {date} [creationTime] the account creation time.
   * @member {date} [lastModifiedTime] the account last modified time.
   * @member {string} [endpoint] the full CName endpoint for this account.
   * @member {uuid} [accountId] The unique identifier associated with this Data
   * Lake Analytics account.
   * @member {string} defaultDataLakeStoreAccount the default data lake storage
   * account associated with this Data Lake Analytics account.
   * @member {number} [maxDegreeOfParallelism] the maximum supported degree of
   * parallelism for this account. Default value: 30 .
   * @member {number} [queryStoreRetention] the number of days that job
   * metadata is retained. Default value: 30 .
   * @member {number} [maxJobCount] the maximum supported jobs running under
   * the account at the same time. Default value: 3 .
   * @member {number} [systemMaxDegreeOfParallelism] the system defined maximum
   * supported degree of parallelism for this account, which restricts the
   * maximum value of parallelism the user can set for the account..
   * @member {number} [systemMaxJobCount] the system defined maximum supported
   * jobs running under the account at the same time, which restricts the
   * maximum number of running jobs the user can set for the account.
   * @member {array} dataLakeStoreAccounts the list of Data Lake storage
   * accounts associated with this account.
   * @member {array} [storageAccounts] the list of Azure Blob storage accounts
   * associated with this account.
   * @member {string} [newTier] the commitment tier for the next month.
   * Possible values include: 'Consumption', 'Commitment_100AUHours',
   * 'Commitment_500AUHours', 'Commitment_1000AUHours',
   * 'Commitment_5000AUHours', 'Commitment_10000AUHours',
   * 'Commitment_50000AUHours', 'Commitment_100000AUHours',
   * 'Commitment_500000AUHours'
   * @member {string} [currentTier] the commitment tier in use for the current
   * 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 compute policies to create
   * in this account.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DataLakeAnalyticsAccount
   *
   * @returns {object} metadata of DataLakeAnalyticsAccount
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DataLakeAnalyticsAccount',
      type: {
        name: 'Composite',
        className: 'DataLakeAnalyticsAccount',
        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'
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Failed', 'Creating', 'Running', 'Succeeded', 'Patching', 'Suspending', 'Resuming', 'Deleting', 'Deleted', 'Undeleting', 'Canceled' ]
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'properties.state',
            type: {
              name: 'Enum',
              allowedValues: [ 'Active', 'Suspended' ]
            }
          },
          creationTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.creationTime',
            type: {
              name: 'DateTime'
            }
          },
          lastModifiedTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.lastModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          endpoint: {
            required: false,
            readOnly: true,
            serializedName: 'properties.endpoint',
            type: {
              name: 'String'
            }
          },
          accountId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.accountId',
            type: {
              name: 'String'
            }
          },
          defaultDataLakeStoreAccount: {
            required: true,
            serializedName: 'properties.defaultDataLakeStoreAccount',
            type: {
              name: 'String'
            }
          },
          maxDegreeOfParallelism: {
            required: false,
            serializedName: 'properties.maxDegreeOfParallelism',
            defaultValue: 30,
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          queryStoreRetention: {
            required: false,
            serializedName: 'properties.queryStoreRetention',
            defaultValue: 30,
            constraints: {
              InclusiveMaximum: 180,
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          maxJobCount: {
            required: false,
            serializedName: 'properties.maxJobCount',
            defaultValue: 3,
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          systemMaxDegreeOfParallelism: {
            required: false,
            readOnly: true,
            serializedName: 'properties.systemMaxDegreeOfParallelism',
            type: {
              name: 'Number'
            }
          },
          systemMaxJobCount: {
            required: false,
            readOnly: true,
            serializedName: 'properties.systemMaxJobCount',
            type: {
              name: 'Number'
            }
          },
          dataLakeStoreAccounts: {
            required: true,
            serializedName: 'properties.dataLakeStoreAccounts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DataLakeStoreAccountInfoElementType',
                  type: {
                    name: 'Composite',
                    className: 'DataLakeStoreAccountInfo'
                  }
              }
            }
          },
          storageAccounts: {
            required: false,
            serializedName: 'properties.storageAccounts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StorageAccountInfoElementType',
                  type: {
                    name: 'Composite',
                    className: 'StorageAccountInfo'
                  }
              }
            }
          },
          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' ]
            }
          },
          currentTier: {
            required: false,
            readOnly: true,
            serializedName: 'properties.currentTier',
            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: 'ComputePolicyAccountCreateParametersElementType',
                  type: {
                    name: 'Composite',
                    className: 'ComputePolicyAccountCreateParameters'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = DataLakeAnalyticsAccount;
