Class: Azure::CognitiveServices::QnamakerRuntime::V4_0::Models::QnASearchResult

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

Overview

Represents Search Result.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#answerString

Returns Answer.

Returns:

  • (String)

    Answer.



19
20
21
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb', line 19

def answer
  @answer
end

#contextQnASearchResultContext

Returns Context object of the QnA.

Returns:



34
35
36
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb', line 34

def context
  @context
end

#idInteger

Returns Id of the QnA result.

Returns:

  • (Integer)

    Id of the QnA result.



25
26
27
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb', line 25

def id
  @id
end

#metadataArray<MetadataDTO>

Returns List of metadata.

Returns:



31
32
33
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb', line 31

def 
  
end

#questionsArray<String>

Returns List of questions.

Returns:

  • (Array<String>)

    List of questions.



16
17
18
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb', line 16

def questions
  @questions
end

#scoreFloat

Returns Search result score.

Returns:

  • (Float)

    Search result score.



22
23
24
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb', line 22

def score
  @score
end

#sourceString

Returns Source of QnA result.

Returns:

  • (String)

    Source of QnA result.



28
29
30
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb', line 28

def source
  @source
end

Class Method Details

.mapperObject

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



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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb', line 41

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'QnASearchResult',
    type: {
      name: 'Composite',
      class_name: 'QnASearchResult',
      model_properties: {
        questions: {
          client_side_validation: true,
          required: false,
          serialized_name: 'questions',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        answer: {
          client_side_validation: true,
          required: false,
          serialized_name: 'answer',
          type: {
            name: 'String'
          }
        },
        score: {
          client_side_validation: true,
          required: false,
          serialized_name: 'score',
          type: {
            name: 'Double'
          }
        },
        id: {
          client_side_validation: true,
          required: false,
          serialized_name: 'id',
          type: {
            name: 'Number'
          }
        },
        source: {
          client_side_validation: true,
          required: false,
          serialized_name: 'source',
          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: 'QnASearchResultContext'
          }
        }
      }
    }
  }
end