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

/**
 * The log profile resource for patch operations.
 *
 */
class LogProfileResourcePatch {
  /**
   * Create a LogProfileResourcePatch.
   * @property {object} [tags] Resource tags
   * @property {string} [storageAccountId] the resource id of the storage
   * account to which you would like to send the Activity Log.
   * @property {string} [serviceBusRuleId] The service bus rule ID of the
   * service bus namespace in which you would like to have Event Hubs created
   * for streaming the Activity Log. The rule ID is of the format: '{service
   * bus resource ID}/authorizationrules/{key name}'.
   * @property {array} locations List of regions for which Activity Log events
   * should be stored or streamed. It is a comma separated list of valid ARM
   * locations including the 'global' location.
   * @property {array} categories the categories of the logs. These categories
   * are created as is convenient to the user. Some values are: 'Write',
   * 'Delete', and/or 'Action.'
   * @property {object} retentionPolicy the retention policy for the events in
   * the 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 LogProfileResourcePatch
   *
   * @returns {object} metadata of LogProfileResourcePatch
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LogProfileResourcePatch',
      type: {
        name: 'Composite',
        className: 'LogProfileResourcePatch',
        modelProperties: {
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          storageAccountId: {
            required: false,
            serializedName: 'properties.storageAccountId',
            type: {
              name: 'String'
            }
          },
          serviceBusRuleId: {
            required: false,
            serializedName: 'properties.serviceBusRuleId',
            type: {
              name: 'String'
            }
          },
          locations: {
            required: true,
            serializedName: 'properties.locations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          categories: {
            required: true,
            serializedName: 'properties.categories',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          retentionPolicy: {
            required: true,
            serializedName: 'properties.retentionPolicy',
            type: {
              name: 'Composite',
              className: 'RetentionPolicy'
            }
          }
        }
      }
    };
  }
}

module.exports = LogProfileResourcePatch;
