azure_cognitiveservices_qnamaker 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/4.0/generated/azure_cognitiveservices_qnamaker.rb +20 -10
  3. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/alterations.rb +4 -0
  4. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/endpoint_keys.rb +4 -0
  5. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/endpoint_settings.rb +214 -0
  6. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/knowledgebase.rb +16 -0
  7. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/active_learning_settings_dto.rb +46 -0
  8. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/context_dto.rb +73 -0
  9. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/endpoint_settings_dto.rb +48 -0
  10. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/endpoint_settings_dtoactive_learning.rb +43 -0
  11. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/prompt_dto.rb +86 -0
  12. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/prompt_dtoqna.rb +108 -0
  13. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adto.rb +12 -0
  14. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adtocontext.rb +63 -0
  15. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_context_dto.rb +90 -0
  16. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_metadata_dto.rb +1 -1
  17. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dto.rb +13 -0
  18. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dtocontext.rb +76 -0
  19. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/operations.rb +2 -0
  20. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/qnamaker_client.rb +6 -6
  21. data/lib/profiles/latest/modules/qnamaker_profile_module.rb +71 -33
  22. data/lib/version.rb +1 -1
  23. metadata +15 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9077d89b381265defa1d720b4f6d8428a722c81ead02a32eb231a012d19a200d
4
- data.tar.gz: 7fb7a81d96606ca435da842079000afc694181254ec4950726f8be4d87ff5009
3
+ metadata.gz: a5e82e19876c0315fecfc5fc4a9a5be47d0d09805ab91543d526a9fbd551d6e4
4
+ data.tar.gz: ec9908ab7f4cc5f7d8dd190b0eff321315a2709f18f8759a4bd6c1b1c2a04a18
5
5
  SHA512:
6
- metadata.gz: c4a9b9a1f51f55e5c1a35143bb9dd5b241ea0614d3a302db813d5cdda5df4bbcc13404093d5df6c7d7bd932e7f6c4093d4f52639c4337fc332d5ea6c1ad70c72
7
- data.tar.gz: 274b7d788d96f66b2aaa88e539898cc7859f4c34f754a25cbf3fcc372190f0070f18df4bc26a0fcded94401dfa453dd455c8e729179011816e66212dc7dc1da9
6
+ metadata.gz: c6b42ce11ce440c6de60edca1e5d6feb9ea2261f6f4990715ce493daaf4c6f4fbc8635c50bcc2e22853f9f6864062e88e684369967b28874696d7bdd8879b30c
7
+ data.tar.gz: 4b475238eeaca1c0eaedbbd0b14e5be7f8e37604856745088540719cbcbdc05aaed4fa0bf53db8207f798f286a8099cefa42879dea077863f256e7bf25c30471
@@ -20,6 +20,7 @@ require '4.0/generated/azure_cognitiveservices_qnamaker/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
22
  module Azure::CognitiveServices::Qnamaker::V4_0
23
+ autoload :EndpointSettings, '4.0/generated/azure_cognitiveservices_qnamaker/endpoint_settings.rb'
23
24
  autoload :EndpointKeys, '4.0/generated/azure_cognitiveservices_qnamaker/endpoint_keys.rb'
24
25
  autoload :Alterations, '4.0/generated/azure_cognitiveservices_qnamaker/alterations.rb'
25
26
  autoload :Knowledgebase, '4.0/generated/azure_cognitiveservices_qnamaker/knowledgebase.rb'
@@ -27,34 +28,43 @@ module Azure::CognitiveServices::Qnamaker::V4_0
27
28
  autoload :QnamakerClient, '4.0/generated/azure_cognitiveservices_qnamaker/qnamaker_client.rb'
28
29
 
29
30
  module Models
31
+ autoload :FileDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/file_dto.rb'
30
32
  autoload :CreateKbInputDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/create_kb_input_dto.rb'
31
33
  autoload :DeleteKbContentsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/delete_kb_contents_dto.rb'
32
- autoload :QnADTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adto.rb'
34
+ autoload :EndpointSettingsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/endpoint_settings_dto.rb'
33
35
  autoload :EndpointKeysDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/endpoint_keys_dto.rb'
34
- autoload :FileDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/file_dto.rb'
35
- autoload :WordAlterationsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/word_alterations_dto.rb'
36
- autoload :KnowledgebasesDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/knowledgebases_dto.rb'
36
+ autoload :QnADTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adto.rb'
37
+ autoload :AlterationsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/alterations_dto.rb'
37
38
  autoload :UpdateQnaDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dto.rb'
38
- autoload :QnADocumentsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adocuments_dto.rb'
39
+ autoload :Operation, '4.0/generated/azure_cognitiveservices_qnamaker/models/operation.rb'
39
40
  autoload :UpdateQuestionsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_questions_dto.rb'
40
- autoload :CreateKbDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/create_kb_dto.rb'
41
+ autoload :KnowledgebasesDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/knowledgebases_dto.rb'
41
42
  autoload :UpdateMetadataDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_metadata_dto.rb'
42
- autoload :ReplaceKbDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/replace_kb_dto.rb'
43
+ autoload :QnADocumentsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adocuments_dto.rb'
44
+ autoload :PromptDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/prompt_dto.rb'
45
+ autoload :CreateKbDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/create_kb_dto.rb'
43
46
  autoload :UpdateKbOperationDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_operation_dto.rb'
44
- autoload :KnowledgebaseDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/knowledgebase_dto.rb'
47
+ autoload :ReplaceKbDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/replace_kb_dto.rb'
45
48
  autoload :UpdateKbContentsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_contents_dto.rb'
49
+ autoload :ContextDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/context_dto.rb'
50
+ autoload :ActiveLearningSettingsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/active_learning_settings_dto.rb'
51
+ autoload :KnowledgebaseDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/knowledgebase_dto.rb'
52
+ autoload :WordAlterationsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/word_alterations_dto.rb'
46
53
  autoload :ErrorResponse, '4.0/generated/azure_cognitiveservices_qnamaker/models/error_response.rb'
54
+ autoload :UpdateContextDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_context_dto.rb'
47
55
  autoload :InnerErrorModel, '4.0/generated/azure_cognitiveservices_qnamaker/models/inner_error_model.rb'
48
56
  autoload :MetadataDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/metadata_dto.rb'
49
57
  autoload :Error, '4.0/generated/azure_cognitiveservices_qnamaker/models/error.rb'
50
- autoload :AlterationsDTO, '4.0/generated/azure_cognitiveservices_qnamaker/models/alterations_dto.rb'
51
- autoload :Operation, '4.0/generated/azure_cognitiveservices_qnamaker/models/operation.rb'
52
58
  autoload :UpdateKbOperationDTOAdd, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_operation_dtoadd.rb'
53
59
  autoload :UpdateKbOperationDTODelete, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_operation_dtodelete.rb'
54
60
  autoload :UpdateKbOperationDTOUpdate, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_operation_dtoupdate.rb'
55
61
  autoload :UpdateQnaDTOQuestions, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dtoquestions.rb'
56
62
  autoload :UpdateQnaDTOMetadata, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dtometadata.rb'
63
+ autoload :UpdateQnaDTOContext, '4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dtocontext.rb'
64
+ autoload :PromptDTOQna, '4.0/generated/azure_cognitiveservices_qnamaker/models/prompt_dtoqna.rb'
65
+ autoload :QnADTOContext, '4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adtocontext.rb'
57
66
  autoload :ErrorResponseError, '4.0/generated/azure_cognitiveservices_qnamaker/models/error_response_error.rb'
67
+ autoload :EndpointSettingsDTOActiveLearning, '4.0/generated/azure_cognitiveservices_qnamaker/models/endpoint_settings_dtoactive_learning.rb'
58
68
  autoload :KnowledgebaseEnvironmentType, '4.0/generated/azure_cognitiveservices_qnamaker/models/knowledgebase_environment_type.rb'
59
69
  autoload :ErrorCodeType, '4.0/generated/azure_cognitiveservices_qnamaker/models/error_code_type.rb'
60
70
  autoload :OperationStateType, '4.0/generated/azure_cognitiveservices_qnamaker/models/operation_state_type.rb'
@@ -86,6 +86,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
86
86
  end
87
87
 
88
88
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
89
91
  # Deserialize Response
90
92
  if status_code == 200
91
93
  begin
@@ -178,6 +180,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
178
180
  end
179
181
 
180
182
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
183
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
184
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
181
185
 
182
186
  result
183
187
  end
@@ -86,6 +86,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
86
86
  end
87
87
 
88
88
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
89
91
  # Deserialize Response
90
92
  if status_code == 200
91
93
  begin
@@ -173,6 +175,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
173
175
  end
174
176
 
175
177
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
178
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
179
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
176
180
  # Deserialize Response
177
181
  if status_code == 200
178
182
  begin
@@ -0,0 +1,214 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::Qnamaker::V4_0
7
+ #
8
+ # An API for QnAMaker Service
9
+ #
10
+ class EndpointSettings
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the EndpointSettings class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [QnamakerClient] reference to the QnamakerClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets endpoint settings for an endpoint.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [EndpointSettingsDTO] operation results.
31
+ #
32
+ def get_settings(custom_headers:nil)
33
+ response = get_settings_async(custom_headers:custom_headers).value!
34
+ response.body unless response.nil?
35
+ end
36
+
37
+ #
38
+ # Gets endpoint settings for an endpoint.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def get_settings_with_http_info(custom_headers:nil)
46
+ get_settings_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Gets endpoint settings for an endpoint.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def get_settings_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'endpointSettings'
68
+
69
+ request_url = @base_url || @client.base_url
70
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
71
+
72
+ options = {
73
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
88
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
91
+ # Deserialize Response
92
+ if status_code == 200
93
+ begin
94
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
95
+ result_mapper = Azure::CognitiveServices::Qnamaker::V4_0::Models::EndpointSettingsDTO.mapper()
96
+ result.body = @client.deserialize(result_mapper, parsed_response)
97
+ rescue Exception => e
98
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
99
+ end
100
+ end
101
+
102
+ result
103
+ end
104
+
105
+ promise.execute
106
+ end
107
+
108
+ #
109
+ # Updates endpoint settings for an endpoint.
110
+ #
111
+ # @param endpoint_settings_payload [EndpointSettingsDTO] Post body of the
112
+ # request.
113
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
114
+ # will be added to the HTTP request.
115
+ #
116
+ # @return [String] operation results.
117
+ #
118
+ def update_settings(endpoint_settings_payload, custom_headers:nil)
119
+ response = update_settings_async(endpoint_settings_payload, custom_headers:custom_headers).value!
120
+ response.body unless response.nil?
121
+ end
122
+
123
+ #
124
+ # Updates endpoint settings for an endpoint.
125
+ #
126
+ # @param endpoint_settings_payload [EndpointSettingsDTO] Post body of the
127
+ # request.
128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
129
+ # will be added to the HTTP request.
130
+ #
131
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
132
+ #
133
+ def update_settings_with_http_info(endpoint_settings_payload, custom_headers:nil)
134
+ update_settings_async(endpoint_settings_payload, custom_headers:custom_headers).value!
135
+ end
136
+
137
+ #
138
+ # Updates endpoint settings for an endpoint.
139
+ #
140
+ # @param endpoint_settings_payload [EndpointSettingsDTO] Post body of the
141
+ # request.
142
+ # @param [Hash{String => String}] A hash of custom headers that will be added
143
+ # to the HTTP request.
144
+ #
145
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
146
+ #
147
+ def update_settings_async(endpoint_settings_payload, custom_headers:nil)
148
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
149
+ fail ArgumentError, 'endpoint_settings_payload is nil' if endpoint_settings_payload.nil?
150
+
151
+
152
+ request_headers = {}
153
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
154
+
155
+ # Set Headers
156
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
157
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
158
+
159
+ # Serialize Request
160
+ request_mapper = Azure::CognitiveServices::Qnamaker::V4_0::Models::EndpointSettingsDTO.mapper()
161
+ request_content = @client.serialize(request_mapper, endpoint_settings_payload)
162
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
163
+
164
+ path_template = 'endpointSettings'
165
+
166
+ request_url = @base_url || @client.base_url
167
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
168
+
169
+ options = {
170
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
171
+ body: request_content,
172
+ headers: request_headers.merge(custom_headers || {}),
173
+ base_url: request_url
174
+ }
175
+ promise = @client.make_request_async(:patch, path_template, options)
176
+
177
+ promise = promise.then do |result|
178
+ http_response = result.response
179
+ status_code = http_response.status
180
+ response_content = http_response.body
181
+ unless status_code == 200
182
+ error_model = JSON.load(response_content)
183
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
184
+ end
185
+
186
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
187
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
188
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
189
+ # Deserialize Response
190
+ if status_code == 200
191
+ begin
192
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
193
+ result_mapper = {
194
+ client_side_validation: true,
195
+ required: false,
196
+ serialized_name: 'parsed_response',
197
+ type: {
198
+ name: 'String'
199
+ }
200
+ }
201
+ result.body = @client.deserialize(result_mapper, parsed_response)
202
+ rescue Exception => e
203
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
204
+ end
205
+ end
206
+
207
+ result
208
+ end
209
+
210
+ promise.execute
211
+ end
212
+
213
+ end
214
+ end
@@ -86,6 +86,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
86
86
  end
87
87
 
88
88
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
89
91
  # Deserialize Response
90
92
  if status_code == 200
91
93
  begin
@@ -173,6 +175,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
173
175
  end
174
176
 
175
177
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
178
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
179
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
176
180
  # Deserialize Response
177
181
  if status_code == 200
178
182
  begin
@@ -259,6 +263,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
259
263
  end
260
264
 
261
265
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
266
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
267
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
262
268
 
263
269
  result
264
270
  end
@@ -335,6 +341,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
335
341
  end
336
342
 
337
343
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
344
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
345
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
338
346
 
339
347
  result
340
348
  end
@@ -425,6 +433,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
425
433
  end
426
434
 
427
435
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
436
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
437
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
428
438
 
429
439
  result
430
440
  end
@@ -513,6 +523,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
513
523
  end
514
524
 
515
525
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
526
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
527
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
516
528
  # Deserialize Response
517
529
  if status_code == 202
518
530
  begin
@@ -606,6 +618,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
606
618
  end
607
619
 
608
620
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
621
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
622
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
609
623
  # Deserialize Response
610
624
  if status_code == 202
611
625
  begin
@@ -700,6 +714,8 @@ module Azure::CognitiveServices::Qnamaker::V4_0
700
714
  end
701
715
 
702
716
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
717
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
718
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
703
719
  # Deserialize Response
704
720
  if status_code == 200
705
721
  begin
@@ -0,0 +1,46 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::Qnamaker::V4_0
7
+ module Models
8
+ #
9
+ # Active Learning settings of the endpoint.
10
+ #
11
+ class ActiveLearningSettingsDTO
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] True/False string providing Active Learning
16
+ attr_accessor :enable
17
+
18
+
19
+ #
20
+ # Mapper for ActiveLearningSettingsDTO class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ client_side_validation: true,
26
+ required: false,
27
+ serialized_name: 'ActiveLearningSettingsDTO',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'ActiveLearningSettingsDTO',
31
+ model_properties: {
32
+ enable: {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'enable',
36
+ type: {
37
+ name: 'String'
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,73 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::CognitiveServices::Qnamaker::V4_0
7
+ module Models
8
+ #
9
+ # Context associated with Qna.
10
+ #
11
+ class ContextDTO
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Boolean] To mark if a prompt is relevant only with a previous
16
+ # question or not.
17
+ # true - Do not include this QnA as search result for queries without
18
+ # context
19
+ # false - ignores context and includes this QnA in search result
20
+ attr_accessor :is_context_only
21
+
22
+ # @return [Array<PromptDTO>] List of prompts associated with the answer.
23
+ attr_accessor :prompts
24
+
25
+
26
+ #
27
+ # Mapper for ContextDTO class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'ContextDTO',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'ContextDTO',
38
+ model_properties: {
39
+ is_context_only: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'isContextOnly',
43
+ type: {
44
+ name: 'Boolean'
45
+ }
46
+ },
47
+ prompts: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'prompts',
51
+ constraints: {
52
+ MaxItems: 20
53
+ },
54
+ type: {
55
+ name: 'Sequence',
56
+ element: {
57
+ client_side_validation: true,
58
+ required: false,
59
+ serialized_name: 'PromptDTOElementType',
60
+ type: {
61
+ name: 'Composite',
62
+ class_name: 'PromptDTO'
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ end
71
+ end
72
+ end
73
+ end