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

/**
 * @class
 * Initializes a new instance of the RecommendationRule class.
 * @constructor
 * Represents a recommendation rule that the recommendation engine can perform.
 *
 * @member {string} [name] Unique name of the rule.
 *
 * @member {string} [displayName] UI friendly name of the rule.
 *
 * @member {string} [message] Localized name of the rule (Good for UI).
 *
 * @member {uuid} [recommendationId] Recommendation ID of an associated
 * recommendation object tied to the rule, if exists.
 * If such an object doesn't exist, it is set to null.
 *
 * @member {string} [description] Localized detailed description of the rule.
 *
 * @member {string} [actionName] Name of action that is recommended by this
 * rule in string.
 *
 * @member {string} [level] Level of impact indicating how critical this rule
 * is. Possible values include: 'Critical', 'Warning', 'Information',
 * 'NonUrgentSuggestion'
 *
 * @member {string} [channels] List of available channels that this rule
 * applies. Possible values include: 'Notification', 'Api', 'Email', 'Webhook',
 * 'All'
 *
 * @member {array} [tags] An array of category tags that the rule contains.
 *
 */
class RecommendationRule {
  constructor() {
  }

  /**
   * Defines the metadata of RecommendationRule
   *
   * @returns {object} metadata of RecommendationRule
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RecommendationRule',
      type: {
        name: 'Composite',
        className: 'RecommendationRule',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'displayName',
            type: {
              name: 'String'
            }
          },
          message: {
            required: false,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          },
          recommendationId: {
            required: false,
            serializedName: 'recommendationId',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          actionName: {
            required: false,
            serializedName: 'actionName',
            type: {
              name: 'String'
            }
          },
          level: {
            required: false,
            serializedName: 'level',
            type: {
              name: 'Enum',
              allowedValues: [ 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' ]
            }
          },
          channels: {
            required: false,
            serializedName: 'channels',
            type: {
              name: 'Enum',
              allowedValues: [ 'Notification', 'Api', 'Email', 'Webhook', 'All' ]
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = RecommendationRule;
