# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::CognitiveServices::Qnamaker::V4_0
  module Models
    #
    # Post body schema for CreateKb operation.
    #
    class CreateKbDTO

      include MsRestAzure

      # @return [String] Friendly name for the knowledgebase.
      attr_accessor :name

      # @return [Array<QnADTO>] List of Q-A (QnADTO) to be added to the
      # knowledgebase. Q-A Ids are assigned by the service and should be
      # omitted.
      attr_accessor :qna_list

      # @return [Array<String>] List of URLs to be used for extracting Q-A.
      attr_accessor :urls

      # @return [Array<FileDTO>] List of files from which to Extract Q-A.
      attr_accessor :files

      # @return [Boolean] Enable hierarchical extraction of Q-A from files and
      # urls. Value to be considered False if this field is not present.
      attr_accessor :enable_hierarchical_extraction

      # @return [String] Text string to be used as the answer in any Q-A which
      # has no extracted answer from the document but has a hierarchy. Required
      # when EnableHierarchicalExtraction field is set to True.
      attr_accessor :default_answer_used_for_extraction

      # @return [String] Language of the knowledgebase.
      attr_accessor :language


      #
      # Mapper for CreateKbDTO class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CreateKbDTO',
          type: {
            name: 'Composite',
            class_name: 'CreateKbDTO',
            model_properties: {
              name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'name',
                constraints: {
                  MaxLength: 100,
                  MinLength: 1
                },
                type: {
                  name: 'String'
                }
              },
              qna_list: {
                client_side_validation: true,
                required: false,
                serialized_name: 'qnaList',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'QnADTOElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'QnADTO'
                      }
                  }
                }
              },
              urls: {
                client_side_validation: true,
                required: false,
                serialized_name: 'urls',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              files: {
                client_side_validation: true,
                required: false,
                serialized_name: 'files',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'FileDTOElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'FileDTO'
                      }
                  }
                }
              },
              enable_hierarchical_extraction: {
                client_side_validation: true,
                required: false,
                serialized_name: 'enableHierarchicalExtraction',
                type: {
                  name: 'Boolean'
                }
              },
              default_answer_used_for_extraction: {
                client_side_validation: true,
                required: false,
                serialized_name: 'defaultAnswerUsedForExtraction',
                constraints: {
                  MaxLength: 300,
                  MinLength: 1
                },
                type: {
                  name: 'String'
                }
              },
              language: {
                client_side_validation: true,
                required: false,
                serialized_name: 'language',
                constraints: {
                  MaxLength: 100,
                  MinLength: 1
                },
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
