/*
 * 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 Representing Solution for problems detected.
 *
 */
class Solution {
  /**
   * Create a Solution.
   * @member {number} [id] Solution Id.
   * @member {string} [displayName] Display Name of the solution
   * @member {number} [order] Order of the solution.
   * @member {string} [description] Description of the solution
   * @member {string} [type] Type of Solution. Possible values include:
   * 'QuickSolution', 'DeepInvestigation', 'BestPractices'
   * @member {array} [data] Solution Data.
   * @member {array} [metadata] Solution Metadata.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Solution
   *
   * @returns {object} metadata of Solution
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Solution',
      type: {
        name: 'Composite',
        className: 'Solution',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'Number'
            }
          },
          displayName: {
            required: false,
            serializedName: 'displayName',
            type: {
              name: 'String'
            }
          },
          order: {
            required: false,
            serializedName: 'order',
            type: {
              name: 'Number'
            }
          },
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'Enum',
              allowedValues: [ 'QuickSolution', 'DeepInvestigation', 'BestPractices' ]
            }
          },
          data: {
            required: false,
            serializedName: 'data',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ArrayElementType',
                  type: {
                    name: 'Sequence',
                    element: {
                        required: false,
                        serializedName: 'NameValuePairElementType',
                        type: {
                          name: 'Composite',
                          className: 'NameValuePair'
                        }
                    }
                  }
              }
            }
          },
          metadata: {
            required: false,
            serializedName: 'metadata',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ArrayElementType',
                  type: {
                    name: 'Sequence',
                    element: {
                        required: false,
                        serializedName: 'NameValuePairElementType',
                        type: {
                          name: 'Composite',
                          className: 'NameValuePair'
                        }
                    }
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = Solution;
