azure_cognitiveservices_qnamakerruntime 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime.rb +47 -0
  4. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/context_dto.rb +73 -0
  5. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/error.rb +108 -0
  6. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/error_code_type.rb +28 -0
  7. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/error_response.rb +48 -0
  8. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/error_response_error.rb +85 -0
  9. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/feedback_record_dto.rb +72 -0
  10. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/feedback_records_dto.rb +55 -0
  11. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/inner_error_model.rb +62 -0
  12. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/metadata_dto.rb +65 -0
  13. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/prompt_dto.rb +86 -0
  14. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/prompt_dtoqna.rb +108 -0
  15. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_adto.rb +128 -0
  16. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_adtocontext.rb +63 -0
  17. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb +130 -0
  18. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result_context.rb +63 -0
  19. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result_list.rb +55 -0
  20. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/query_context_dto.rb +57 -0
  21. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/query_dto.rb +137 -0
  22. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/models/query_dtocontext.rb +51 -0
  23. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/module_definition.rb +9 -0
  24. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/qnamaker_runtime_client.rb +127 -0
  25. data/lib/4.0/generated/azure_cognitiveservices_qnamakerruntime/runtime.rb +214 -0
  26. data/lib/azure_cognitiveservices_qnamakerruntime.rb +6 -0
  27. data/lib/module_definition.rb +7 -0
  28. data/lib/profiles/latest/modules/qnamakerruntime_profile_module.rb +135 -0
  29. data/lib/profiles/latest/qnamakerruntime_latest_profile_client.rb +38 -0
  30. data/lib/profiles/latest/qnamakerruntime_module_definition.rb +8 -0
  31. data/lib/version.rb +7 -0
  32. metadata +147 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6b286cf61164334c0ca56dce1840f921fbce19d7df323bbbacb262d27e4364f4
4
+ data.tar.gz: 3965cbbf3890af8f977a6773fc20b7f89b87ee887c3c508629c194f93694b01f
5
+ SHA512:
6
+ metadata.gz: bab9405bc175263683862d287052986b04d23259102953ca026ae421fac860b7708967e5a075537861b9bf9718015bae47cfa3f5e68bb2ab8222f7dd560c746c
7
+ data.tar.gz: cb3dfe2ab1ec22d1b3ecc1ca37b602999c77ec227d7313598d1f7559333c5040f4c99384a4bc5b7b9aea694b91093990db4fa0c7083909ba6d2592fccdb6becb
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,47 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '4.0/generated/azure_cognitiveservices_qnamakerruntime/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::CognitiveServices::QnamakerRuntime::V4_0
23
+ autoload :Runtime, '4.0/generated/azure_cognitiveservices_qnamakerruntime/runtime.rb'
24
+ autoload :QnamakerRuntimeClient, '4.0/generated/azure_cognitiveservices_qnamakerruntime/qnamaker_runtime_client.rb'
25
+
26
+ module Models
27
+ autoload :Error, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/error.rb'
28
+ autoload :MetadataDTO, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/metadata_dto.rb'
29
+ autoload :ErrorResponse, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/error_response.rb'
30
+ autoload :InnerErrorModel, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/inner_error_model.rb'
31
+ autoload :FeedbackRecordDTO, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/feedback_record_dto.rb'
32
+ autoload :QnASearchResult, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result.rb'
33
+ autoload :ContextDTO, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/context_dto.rb'
34
+ autoload :QnADTO, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_adto.rb'
35
+ autoload :QueryDTO, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/query_dto.rb'
36
+ autoload :QnASearchResultList, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result_list.rb'
37
+ autoload :QueryContextDTO, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/query_context_dto.rb'
38
+ autoload :PromptDTO, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/prompt_dto.rb'
39
+ autoload :FeedbackRecordsDTO, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/feedback_records_dto.rb'
40
+ autoload :QnADTOContext, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_adtocontext.rb'
41
+ autoload :PromptDTOQna, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/prompt_dtoqna.rb'
42
+ autoload :ErrorResponseError, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/error_response_error.rb'
43
+ autoload :QueryDTOContext, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/query_dtocontext.rb'
44
+ autoload :QnASearchResultContext, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/qn_asearch_result_context.rb'
45
+ autoload :ErrorCodeType, '4.0/generated/azure_cognitiveservices_qnamakerruntime/models/error_code_type.rb'
46
+ end
47
+ 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::QnamakerRuntime::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
@@ -0,0 +1,108 @@
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::QnamakerRuntime::V4_0
7
+ module Models
8
+ #
9
+ # The error object. As per Microsoft One API guidelines -
10
+ # https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
11
+ #
12
+ class Error
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [ErrorCodeType] One of a server-defined set of error codes.
17
+ # Possible values include: 'BadArgument', 'Forbidden', 'NotFound',
18
+ # 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError',
19
+ # 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded',
20
+ # 'OperationNotFound', 'ServiceError', 'ValidationFailure',
21
+ # 'ExtractionFailure'
22
+ attr_accessor :code
23
+
24
+ # @return [String] A human-readable representation of the error.
25
+ attr_accessor :message
26
+
27
+ # @return [String] The target of the error.
28
+ attr_accessor :target
29
+
30
+ # @return [Array<Error>] An array of details about specific errors that
31
+ # led to this reported error.
32
+ attr_accessor :details
33
+
34
+ # @return [InnerErrorModel] An object containing more specific
35
+ # information than the current object about the error.
36
+ attr_accessor :inner_error
37
+
38
+
39
+ #
40
+ # Mapper for Error class as Ruby Hash.
41
+ # This will be used for serialization/deserialization.
42
+ #
43
+ def self.mapper()
44
+ {
45
+ client_side_validation: true,
46
+ required: false,
47
+ serialized_name: 'Error',
48
+ type: {
49
+ name: 'Composite',
50
+ class_name: 'Error',
51
+ model_properties: {
52
+ code: {
53
+ client_side_validation: true,
54
+ required: true,
55
+ serialized_name: 'code',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ },
60
+ message: {
61
+ client_side_validation: true,
62
+ required: false,
63
+ serialized_name: 'message',
64
+ type: {
65
+ name: 'String'
66
+ }
67
+ },
68
+ target: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ serialized_name: 'target',
72
+ type: {
73
+ name: 'String'
74
+ }
75
+ },
76
+ details: {
77
+ client_side_validation: true,
78
+ required: false,
79
+ serialized_name: 'details',
80
+ type: {
81
+ name: 'Sequence',
82
+ element: {
83
+ client_side_validation: true,
84
+ required: false,
85
+ serialized_name: 'ErrorElementType',
86
+ type: {
87
+ name: 'Composite',
88
+ class_name: 'Error'
89
+ }
90
+ }
91
+ }
92
+ },
93
+ inner_error: {
94
+ client_side_validation: true,
95
+ required: false,
96
+ serialized_name: 'innerError',
97
+ type: {
98
+ name: 'Composite',
99
+ class_name: 'InnerErrorModel'
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,28 @@
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::QnamakerRuntime::V4_0
7
+ module Models
8
+ #
9
+ # Defines values for ErrorCodeType
10
+ #
11
+ module ErrorCodeType
12
+ BadArgument = "BadArgument"
13
+ Forbidden = "Forbidden"
14
+ NotFound = "NotFound"
15
+ KbNotFound = "KbNotFound"
16
+ Unauthorized = "Unauthorized"
17
+ Unspecified = "Unspecified"
18
+ EndpointKeysError = "EndpointKeysError"
19
+ QuotaExceeded = "QuotaExceeded"
20
+ QnaRuntimeError = "QnaRuntimeError"
21
+ SKULimitExceeded = "SKULimitExceeded"
22
+ OperationNotFound = "OperationNotFound"
23
+ ServiceError = "ServiceError"
24
+ ValidationFailure = "ValidationFailure"
25
+ ExtractionFailure = "ExtractionFailure"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,48 @@
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::QnamakerRuntime::V4_0
7
+ module Models
8
+ #
9
+ # Error response. As per Microsoft One API guidelines -
10
+ # https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
11
+ #
12
+ class ErrorResponse
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [ErrorResponseError] The error object.
17
+ attr_accessor :error
18
+
19
+
20
+ #
21
+ # Mapper for ErrorResponse class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'ErrorResponse',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'ErrorResponse',
32
+ model_properties: {
33
+ error: {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'error',
37
+ type: {
38
+ name: 'Composite',
39
+ class_name: 'ErrorResponseError'
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,85 @@
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::QnamakerRuntime::V4_0
7
+ module Models
8
+ #
9
+ # The error object.
10
+ #
11
+ class ErrorResponseError < Error
12
+
13
+ include MsRestAzure
14
+
15
+
16
+ #
17
+ # Mapper for ErrorResponseError class as Ruby Hash.
18
+ # This will be used for serialization/deserialization.
19
+ #
20
+ def self.mapper()
21
+ {
22
+ client_side_validation: true,
23
+ required: false,
24
+ serialized_name: 'ErrorResponse_error',
25
+ type: {
26
+ name: 'Composite',
27
+ class_name: 'ErrorResponseError',
28
+ model_properties: {
29
+ code: {
30
+ client_side_validation: true,
31
+ required: true,
32
+ serialized_name: 'code',
33
+ type: {
34
+ name: 'String'
35
+ }
36
+ },
37
+ message: {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'message',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ target: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'target',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ },
53
+ details: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'details',
57
+ type: {
58
+ name: 'Sequence',
59
+ element: {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'ErrorElementType',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'Error'
66
+ }
67
+ }
68
+ }
69
+ },
70
+ inner_error: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ serialized_name: 'innerError',
74
+ type: {
75
+ name: 'Composite',
76
+ class_name: 'InnerErrorModel'
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,72 @@
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::QnamakerRuntime::V4_0
7
+ module Models
8
+ #
9
+ # Active learning feedback record.
10
+ #
11
+ class FeedbackRecordDTO
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Unique identifier for the user.
16
+ attr_accessor :user_id
17
+
18
+ # @return [String] The suggested question being provided as feedback.
19
+ attr_accessor :user_question
20
+
21
+ # @return [Integer] The qnaId for which the suggested question is
22
+ # provided as feedback.
23
+ attr_accessor :qna_id
24
+
25
+
26
+ #
27
+ # Mapper for FeedbackRecordDTO 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: 'FeedbackRecordDTO',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'FeedbackRecordDTO',
38
+ model_properties: {
39
+ user_id: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'userId',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ user_question: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'userQuestion',
51
+ constraints: {
52
+ MaxLength: 1000
53
+ },
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ },
58
+ qna_id: {
59
+ client_side_validation: true,
60
+ required: false,
61
+ serialized_name: 'qnaId',
62
+ type: {
63
+ name: 'Number'
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ end
70
+ end
71
+ end
72
+ end