

'use strict';

/**
 * Api input base class for LogAnalytics Api.
 *
 */
class LogAnalyticsInputBase {
  /**
   * Create a LogAnalyticsInputBase.
   * @property {string} blobContainerSasUri SAS Uri of the logging blob
   * container to which LogAnalytics Api writes output logs to.
   * @property {date} fromTime From time of the query
   * @property {date} toTime To time of the query
   * @property {boolean} [groupByThrottlePolicy] Group query result by Throttle
   * Policy applied.
   * @property {boolean} [groupByOperationName] Group query result by Operation
   * Name.
   * @property {boolean} [groupByResourceName] Group query result by Resource
   * Name.
   */
  constructor() {
  }

  /**
   * Defines the metadata of LogAnalyticsInputBase
   *
   * @returns {object} metadata of LogAnalyticsInputBase
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LogAnalyticsInputBase',
      type: {
        name: 'Composite',
        className: 'LogAnalyticsInputBase',
        modelProperties: {
          blobContainerSasUri: {
            required: true,
            serializedName: 'blobContainerSasUri',
            type: {
              name: 'String'
            }
          },
          fromTime: {
            required: true,
            serializedName: 'fromTime',
            type: {
              name: 'DateTime'
            }
          },
          toTime: {
            required: true,
            serializedName: 'toTime',
            type: {
              name: 'DateTime'
            }
          },
          groupByThrottlePolicy: {
            required: false,
            serializedName: 'groupByThrottlePolicy',
            type: {
              name: 'Boolean'
            }
          },
          groupByOperationName: {
            required: false,
            serializedName: 'groupByOperationName',
            type: {
              name: 'Boolean'
            }
          },
          groupByResourceName: {
            required: false,
            serializedName: 'groupByResourceName',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = LogAnalyticsInputBase;
