# 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::QnamakerRuntime::V4_0
  module Models
    #
    # Prompt for an answer.
    #
    class PromptDTO

      include MsRestAzure

      # @return [Integer] Index of the prompt - used in ordering of the prompts
      attr_accessor :display_order

      # @return [Integer] Qna id corresponding to the prompt - if QnaId is
      # present, QnADTO object is ignored.
      attr_accessor :qna_id

      # @return [PromptDTOQna] QnADTO - Either QnaId or QnADTO needs to be
      # present in a PromptDTO object
      attr_accessor :qna

      # @return [String] Text displayed to represent a follow up question
      # prompt
      attr_accessor :display_text


      #
      # Mapper for PromptDTO class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'PromptDTO',
          type: {
            name: 'Composite',
            class_name: 'PromptDTO',
            model_properties: {
              display_order: {
                client_side_validation: true,
                required: false,
                serialized_name: 'displayOrder',
                type: {
                  name: 'Number'
                }
              },
              qna_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'qnaId',
                type: {
                  name: 'Number'
                }
              },
              qna: {
                client_side_validation: true,
                required: false,
                serialized_name: 'qna',
                type: {
                  name: 'Composite',
                  class_name: 'PromptDTOQna'
                }
              },
              display_text: {
                client_side_validation: true,
                required: false,
                serialized_name: 'displayText',
                constraints: {
                  MaxLength: 200
                },
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
