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

/**
 * Information on the configuration of flow log and traffic analytics
 * (optional) .
 *
 */
class FlowLogInformation {
  /**
   * Create a FlowLogInformation.
   * @property {string} targetResourceId The ID of the resource to configure
   * for flow log and traffic analytics (optional) .
   * @property {string} storageId ID of the storage account which is used to
   * store the flow log.
   * @property {boolean} enabled Flag to enable/disable flow logging.
   * @property {object} [retentionPolicy] Parameters that define the retention
   * policy for flow log.
   * @property {number} [retentionPolicy.days] Number of days to retain flow
   * log records.
   * @property {boolean} [retentionPolicy.enabled] Flag to enable/disable
   * retention.
   * @property {object} [format] Parameters that define the flow log format.
   * @property {string} [format.type] The file type of flow log. Possible
   * values include: 'JSON'
   * @property {number} [format.version] The version (revision) of the flow
   * log.
   * @property {object} [flowAnalyticsConfiguration] Parameters that define the
   * configuration of traffic analytics.
   * @property {object}
   * [flowAnalyticsConfiguration.networkWatcherFlowAnalyticsConfiguration]
   * Parameters that define the configuration of traffic analytics.
   * @property {boolean}
   * [flowAnalyticsConfiguration.networkWatcherFlowAnalyticsConfiguration.enabled]
   * Flag to enable/disable traffic analytics.
   * @property {string}
   * [flowAnalyticsConfiguration.networkWatcherFlowAnalyticsConfiguration.workspaceId]
   * The resource guid of the attached workspace
   * @property {string}
   * [flowAnalyticsConfiguration.networkWatcherFlowAnalyticsConfiguration.workspaceRegion]
   * The location of the attached workspace
   * @property {string}
   * [flowAnalyticsConfiguration.networkWatcherFlowAnalyticsConfiguration.workspaceResourceId]
   * Resource Id of the attached workspace
   * @property {number}
   * [flowAnalyticsConfiguration.networkWatcherFlowAnalyticsConfiguration.trafficAnalyticsInterval]
   * The interval in minutes which would decide how frequently TA service
   * should do flow analytics
   */
  constructor() {
  }

  /**
   * Defines the metadata of FlowLogInformation
   *
   * @returns {object} metadata of FlowLogInformation
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FlowLogInformation',
      type: {
        name: 'Composite',
        className: 'FlowLogInformation',
        modelProperties: {
          targetResourceId: {
            required: true,
            serializedName: 'targetResourceId',
            type: {
              name: 'String'
            }
          },
          storageId: {
            required: true,
            serializedName: 'properties.storageId',
            type: {
              name: 'String'
            }
          },
          enabled: {
            required: true,
            serializedName: 'properties.enabled',
            type: {
              name: 'Boolean'
            }
          },
          retentionPolicy: {
            required: false,
            serializedName: 'properties.retentionPolicy',
            type: {
              name: 'Composite',
              className: 'RetentionPolicyParameters'
            }
          },
          format: {
            required: false,
            serializedName: 'properties.format',
            type: {
              name: 'Composite',
              className: 'FlowLogFormatParameters'
            }
          },
          flowAnalyticsConfiguration: {
            required: false,
            serializedName: 'flowAnalyticsConfiguration',
            type: {
              name: 'Composite',
              className: 'TrafficAnalyticsProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = FlowLogInformation;
