Class: Azure::CognitiveServices::QnamakerRuntime::V4_0::Models::PromptDTOQna

Inherits:
QnADTO
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/prompt_dtoqna.rb

Overview

QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object

Instance Attribute Summary

Attributes inherited from QnADTO

#answer, #context, #id, #metadata, #questions, #source

Class Method Summary collapse

Class Method Details

.mapperObject

Mapper for PromptDTOQna class as Ruby Hash. This will be used for serialization/deserialization.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/prompt_dtoqna.rb', line 20

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'PromptDTO_qna',
    type: {
      name: 'Composite',
      class_name: 'PromptDTOQna',
      model_properties: {
        id: {
          client_side_validation: true,
          required: false,
          serialized_name: 'id',
          type: {
            name: 'Number'
          }
        },
        answer: {
          client_side_validation: true,
          required: true,
          serialized_name: 'answer',
          constraints: {
            MaxLength: 25000,
            MinLength: 1
          },
          type: {
            name: 'String'
          }
        },
        source: {
          client_side_validation: true,
          required: false,
          serialized_name: 'source',
          constraints: {
            MaxLength: 300
          },
          type: {
            name: 'String'
          }
        },
        questions: {
          client_side_validation: true,
          required: true,
          serialized_name: 'questions',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        metadata: {
          client_side_validation: true,
          required: false,
          serialized_name: 'metadata',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'MetadataDTOElementType',
                type: {
                  name: 'Composite',
                  class_name: 'MetadataDTO'
                }
            }
          }
        },
        context: {
          client_side_validation: true,
          required: false,
          serialized_name: 'context',
          type: {
            name: 'Composite',
            class_name: 'QnADTOContext'
          }
        }
      }
    }
  }
end