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

/**
 * Represents the activity on an elastic pool.
 *
 * @extends models['ProxyResource']
 */
class ElasticPoolActivity extends models['ProxyResource'] {
  /**
   * Create a ElasticPoolActivity.
   * @property {string} [location] The geo-location where the resource lives
   * @property {date} [endTime] The time the operation finished (ISO8601
   * format).
   * @property {number} [errorCode] The error code if available.
   * @property {string} [errorMessage] The error message if available.
   * @property {number} [errorSeverity] The error severity if available.
   * @property {string} [operation] The operation name.
   * @property {uuid} [operationId] The unique operation ID.
   * @property {number} [percentComplete] The percentage complete if available.
   * @property {number} [requestedDatabaseDtuMax] The requested max DTU per
   * database if available.
   * @property {number} [requestedDatabaseDtuMin] The requested min DTU per
   * database if available.
   * @property {number} [requestedDtu] The requested DTU for the pool if
   * available.
   * @property {string} [requestedElasticPoolName] The requested name for the
   * elastic pool if available.
   * @property {number} [requestedStorageLimitInGB] The requested storage limit
   * for the pool in GB if available.
   * @property {string} [elasticPoolName] The name of the elastic pool.
   * @property {string} [serverName] The name of the server the elastic pool is
   * in.
   * @property {date} [startTime] The time the operation started (ISO8601
   * format).
   * @property {string} [state] The current state of the operation.
   * @property {number} [requestedStorageLimitInMB] The requested storage limit
   * in MB.
   * @property {number} [requestedDatabaseDtuGuarantee] The requested per
   * database DTU guarantee.
   * @property {number} [requestedDatabaseDtuCap] The requested per database
   * DTU cap.
   * @property {number} [requestedDtuGuarantee] The requested DTU guarantee.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ElasticPoolActivity
   *
   * @returns {object} metadata of ElasticPoolActivity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ElasticPoolActivity',
      type: {
        name: 'Composite',
        className: 'ElasticPoolActivity',
        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: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          endTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.endTime',
            type: {
              name: 'DateTime'
            }
          },
          errorCode: {
            required: false,
            readOnly: true,
            serializedName: 'properties.errorCode',
            type: {
              name: 'Number'
            }
          },
          errorMessage: {
            required: false,
            readOnly: true,
            serializedName: 'properties.errorMessage',
            type: {
              name: 'String'
            }
          },
          errorSeverity: {
            required: false,
            readOnly: true,
            serializedName: 'properties.errorSeverity',
            type: {
              name: 'Number'
            }
          },
          operation: {
            required: false,
            readOnly: true,
            serializedName: 'properties.operation',
            type: {
              name: 'String'
            }
          },
          operationId: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'properties.operationId',
            type: {
              name: 'String'
            }
          },
          percentComplete: {
            required: false,
            readOnly: true,
            serializedName: 'properties.percentComplete',
            type: {
              name: 'Number'
            }
          },
          requestedDatabaseDtuMax: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedDatabaseDtuMax',
            type: {
              name: 'Number'
            }
          },
          requestedDatabaseDtuMin: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedDatabaseDtuMin',
            type: {
              name: 'Number'
            }
          },
          requestedDtu: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedDtu',
            type: {
              name: 'Number'
            }
          },
          requestedElasticPoolName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedElasticPoolName',
            type: {
              name: 'String'
            }
          },
          requestedStorageLimitInGB: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedStorageLimitInGB',
            type: {
              name: 'Number'
            }
          },
          elasticPoolName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.elasticPoolName',
            type: {
              name: 'String'
            }
          },
          serverName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.serverName',
            type: {
              name: 'String'
            }
          },
          startTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.startTime',
            type: {
              name: 'DateTime'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'properties.state',
            type: {
              name: 'String'
            }
          },
          requestedStorageLimitInMB: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedStorageLimitInMB',
            type: {
              name: 'Number'
            }
          },
          requestedDatabaseDtuGuarantee: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedDatabaseDtuGuarantee',
            type: {
              name: 'Number'
            }
          },
          requestedDatabaseDtuCap: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedDatabaseDtuCap',
            type: {
              name: 'Number'
            }
          },
          requestedDtuGuarantee: {
            required: false,
            readOnly: true,
            serializedName: 'properties.requestedDtuGuarantee',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = ElasticPoolActivity;
