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

/**
 * Response schema for CreateKb operation.
 *
 */
class KnowledgebaseDTO {
  /**
   * Create a KnowledgebaseDTO.
   * @property {string} [id] Unique id that identifies a knowledgebase.
   * @property {string} [hostName] URL host name at which the knowledgebase is
   * hosted.
   * @property {string} [lastAccessedTimestamp] Time stamp at which the
   * knowledgebase was last accessed (UTC).
   * @property {string} [lastChangedTimestamp] Time stamp at which the
   * knowledgebase was last modified (UTC).
   * @property {string} [lastPublishedTimestamp] Time stamp at which the
   * knowledgebase was last published (UTC).
   * @property {string} [name] Friendly name of the knowledgebase.
   * @property {string} [userId] User who created / owns the knowledgebase.
   * @property {array} [urls] URL sources from which Q-A were extracted and
   * added to the knowledgebase.
   * @property {array} [sources] Custom sources from which Q-A were extracted
   * or explicitly added to the knowledgebase.
   */
  constructor() {
  }

  /**
   * Defines the metadata of KnowledgebaseDTO
   *
   * @returns {object} metadata of KnowledgebaseDTO
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'KnowledgebaseDTO',
      type: {
        name: 'Composite',
        className: 'KnowledgebaseDTO',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          hostName: {
            required: false,
            serializedName: 'hostName',
            type: {
              name: 'String'
            }
          },
          lastAccessedTimestamp: {
            required: false,
            serializedName: 'lastAccessedTimestamp',
            type: {
              name: 'String'
            }
          },
          lastChangedTimestamp: {
            required: false,
            serializedName: 'lastChangedTimestamp',
            type: {
              name: 'String'
            }
          },
          lastPublishedTimestamp: {
            required: false,
            serializedName: 'lastPublishedTimestamp',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          userId: {
            required: false,
            serializedName: 'userId',
            type: {
              name: 'String'
            }
          },
          urls: {
            required: false,
            serializedName: 'urls',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          sources: {
            required: false,
            serializedName: 'sources',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = KnowledgebaseDTO;
