# 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
    #
    # Contains list of QnAs to be updated
    #
    class UpdateKbOperationDTO

      include MsRestAzure

      # @return [UpdateKbOperationDTOAdd] An instance of CreateKbInputDTO for
      # add operation
      attr_accessor :add

      # @return [UpdateKbOperationDTODelete] An instance of DeleteKbContentsDTO
      # for delete Operation
      attr_accessor :delete

      # @return [UpdateKbOperationDTOUpdate] An instance of UpdateKbContentsDTO
      # for Update Operation
      attr_accessor :update

      # @return [Boolean] Enable hierarchical extraction of Q-A from files and
      # urls. The value set during KB creation will be used 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


      #
      # Mapper for UpdateKbOperationDTO class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'UpdateKbOperationDTO',
          type: {
            name: 'Composite',
            class_name: 'UpdateKbOperationDTO',
            model_properties: {
              add: {
                client_side_validation: true,
                required: false,
                serialized_name: 'add',
                type: {
                  name: 'Composite',
                  class_name: 'UpdateKbOperationDTOAdd'
                }
              },
              delete: {
                client_side_validation: true,
                required: false,
                serialized_name: 'delete',
                type: {
                  name: 'Composite',
                  class_name: 'UpdateKbOperationDTODelete'
                }
              },
              update: {
                client_side_validation: true,
                required: false,
                serialized_name: 'update',
                type: {
                  name: 'Composite',
                  class_name: 'UpdateKbOperationDTOUpdate'
                }
              },
              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'
                }
              }
            }
          }
        }
      end
    end
  end
end
