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

/**
 * Part of MultiTenantDiagnosticSettings. Specifies the settings for a
 * particular log.
 *
 */
class LogSettings {
  /**
   * Create a LogSettings.
   * @property {string} [category] Name of a Diagnostic Log category for a
   * resource type this setting is applied to. To obtain the list of Diagnostic
   * Log categories for a resource, first perform a GET diagnostic settings
   * operation.
   * @property {boolean} enabled a value indicating whether this log is
   * enabled.
   * @property {object} [retentionPolicy] the retention policy for this log.
   * @property {boolean} [retentionPolicy.enabled] a value indicating whether
   * the retention policy is enabled.
   * @property {number} [retentionPolicy.days] the number of days for the
   * retention in days. A value of 0 will retain the events indefinitely.
   */
  constructor() {
  }

  /**
   * Defines the metadata of LogSettings
   *
   * @returns {object} metadata of LogSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LogSettings',
      type: {
        name: 'Composite',
        className: 'LogSettings',
        modelProperties: {
          category: {
            required: false,
            serializedName: 'category',
            type: {
              name: 'String'
            }
          },
          enabled: {
            required: true,
            serializedName: 'enabled',
            type: {
              name: 'Boolean'
            }
          },
          retentionPolicy: {
            required: false,
            serializedName: 'retentionPolicy',
            type: {
              name: 'Composite',
              className: 'RetentionPolicy'
            }
          }
        }
      }
    };
  }
}

module.exports = LogSettings;
