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

/**
 * PATCH Body schema for Update Qna List
 *
 */
class UpdateQnaDTO {
  /**
   * Create a UpdateQnaDTO.
   * @property {number} [id] Unique id for the Q-A
   * @property {string} [answer] Answer text
   * @property {string} [source] Source from which Q-A was indexed. eg.
   * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs
   * @property {object} [questions] List of questions associated with the
   * answer.
   * @property {object} [metadata] List of metadata associated with the answer
   * to be updated
   */
  constructor() {
  }

  /**
   * Defines the metadata of UpdateQnaDTO
   *
   * @returns {object} metadata of UpdateQnaDTO
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'UpdateQnaDTO',
      type: {
        name: 'Composite',
        className: 'UpdateQnaDTO',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            constraints: {
              InclusiveMaximum: 2147483647,
              InclusiveMinimum: 0
            },
            type: {
              name: 'Number'
            }
          },
          answer: {
            required: false,
            serializedName: 'answer',
            type: {
              name: 'String'
            }
          },
          source: {
            required: false,
            serializedName: 'source',
            constraints: {
              MaxLength: 300
            },
            type: {
              name: 'String'
            }
          },
          questions: {
            required: false,
            serializedName: 'questions',
            type: {
              name: 'Composite',
              className: 'UpdateQnaDTOQuestions'
            }
          },
          metadata: {
            required: false,
            serializedName: 'metadata',
            type: {
              name: 'Composite',
              className: 'UpdateQnaDTOMetadata'
            }
          }
        }
      }
    };
  }
}

module.exports = UpdateQnaDTO;
