azure_cognitiveservices_qnamaker 0.18.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +20 -20
  3. data/lib/4.0/generated/azure_cognitiveservices_qnamaker.rb +0 -0
  4. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/alterations.rb +193 -193
  5. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/endpoint_keys.rb +198 -198
  6. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/endpoint_settings.rb +214 -214
  7. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/knowledgebase.rb +737 -737
  8. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/active_learning_settings_dto.rb +46 -46
  9. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/alterations_dto.rb +54 -54
  10. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/context_dto.rb +73 -73
  11. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/create_kb_dto.rb +0 -0
  12. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/create_kb_input_dto.rb +95 -95
  13. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/delete_kb_contents_dto.rb +74 -74
  14. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/endpoint_keys_dto.rb +0 -0
  15. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/endpoint_settings_dto.rb +48 -48
  16. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/endpoint_settings_dtoactive_learning.rb +43 -43
  17. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/environment_type.rb +16 -16
  18. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/error.rb +108 -108
  19. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/error_code_type.rb +28 -28
  20. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/error_response.rb +48 -48
  21. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/error_response_error.rb +85 -85
  22. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/file_dto.rb +62 -62
  23. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/inner_error_model.rb +62 -62
  24. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/knowledgebase_dto.rb +155 -155
  25. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/knowledgebases_dto.rb +55 -55
  26. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/metadata_dto.rb +65 -65
  27. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/operation.rb +115 -115
  28. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/operation_state_type.rb +18 -18
  29. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/prompt_dto.rb +86 -86
  30. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/prompt_dtoqna.rb +108 -108
  31. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adocuments_dto.rb +55 -55
  32. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adto.rb +128 -128
  33. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/qn_adtocontext.rb +63 -63
  34. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/replace_kb_dto.rb +57 -57
  35. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_context_dto.rb +90 -90
  36. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_contents_dto.rb +87 -87
  37. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_operation_dto.rb +0 -0
  38. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_operation_dtoadd.rb +85 -85
  39. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_operation_dtodelete.rb +67 -67
  40. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_kb_operation_dtoupdate.rb +76 -76
  41. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_metadata_dto.rb +77 -77
  42. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dto.rb +115 -115
  43. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dtocontext.rb +76 -76
  44. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dtometadata.rb +69 -69
  45. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_qna_dtoquestions.rb +67 -67
  46. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/update_questions_dto.rb +74 -74
  47. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/models/word_alterations_dto.rb +55 -55
  48. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/module_definition.rb +9 -9
  49. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/operations.rb +114 -114
  50. data/lib/4.0/generated/azure_cognitiveservices_qnamaker/qnamaker_client.rb +1 -1
  51. data/lib/azure_cognitiveservices_qnamaker.rb +6 -6
  52. data/lib/module_definition.rb +7 -7
  53. data/lib/profiles/latest/modules/qnamaker_profile_module.rb +0 -0
  54. data/lib/profiles/latest/qnamaker_latest_profile_client.rb +38 -38
  55. data/lib/profiles/latest/qnamaker_module_definition.rb +8 -8
  56. data/lib/version.rb +1 -1
  57. metadata +5 -5
@@ -1,9 +1,9 @@
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 end
7
- module Azure::CognitiveServices end
8
- module Azure::CognitiveServices::Qnamaker end
9
- module Azure::CognitiveServices::Qnamaker::V4_0 end
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 end
7
+ module Azure::CognitiveServices end
8
+ module Azure::CognitiveServices::Qnamaker end
9
+ module Azure::CognitiveServices::Qnamaker::V4_0 end
@@ -1,114 +1,114 @@
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 Operations
11
- include MsRestAzure
12
-
13
- #
14
- # Creates and initializes a new instance of the Operations 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 details of a specific long running operation.
26
- #
27
- # @param operation_id [String] Operation id.
28
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
- # will be added to the HTTP request.
30
- #
31
- # @return [Operation] operation results.
32
- #
33
- def get_details(operation_id, custom_headers:nil)
34
- response = get_details_async(operation_id, custom_headers:custom_headers).value!
35
- response.body unless response.nil?
36
- end
37
-
38
- #
39
- # Gets details of a specific long running operation.
40
- #
41
- # @param operation_id [String] Operation id.
42
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
- # will be added to the HTTP request.
44
- #
45
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
- #
47
- def get_details_with_http_info(operation_id, custom_headers:nil)
48
- get_details_async(operation_id, custom_headers:custom_headers).value!
49
- end
50
-
51
- #
52
- # Gets details of a specific long running operation.
53
- #
54
- # @param operation_id [String] Operation id.
55
- # @param [Hash{String => String}] A hash of custom headers that will be added
56
- # to the HTTP request.
57
- #
58
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
- #
60
- def get_details_async(operation_id, custom_headers:nil)
61
- fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
62
- fail ArgumentError, 'operation_id is nil' if operation_id.nil?
63
-
64
-
65
- request_headers = {}
66
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
67
-
68
- # Set Headers
69
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
70
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
71
- path_template = 'operations/{operationId}'
72
-
73
- request_url = @base_url || @client.base_url
74
- request_url = request_url.gsub('{Endpoint}', @client.endpoint)
75
-
76
- options = {
77
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
- path_params: {'operationId' => operation_id},
79
- headers: request_headers.merge(custom_headers || {}),
80
- base_url: request_url
81
- }
82
- promise = @client.make_request_async(:get, path_template, options)
83
-
84
- promise = promise.then do |result|
85
- http_response = result.response
86
- status_code = http_response.status
87
- response_content = http_response.body
88
- unless status_code == 200
89
- error_model = JSON.load(response_content)
90
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
91
- end
92
-
93
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
94
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
95
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
96
- # Deserialize Response
97
- if status_code == 200
98
- begin
99
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
100
- result_mapper = Azure::CognitiveServices::Qnamaker::V4_0::Models::Operation.mapper()
101
- result.body = @client.deserialize(result_mapper, parsed_response)
102
- rescue Exception => e
103
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
104
- end
105
- end
106
-
107
- result
108
- end
109
-
110
- promise.execute
111
- end
112
-
113
- end
114
- end
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 Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations 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 details of a specific long running operation.
26
+ #
27
+ # @param operation_id [String] Operation id.
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Operation] operation results.
32
+ #
33
+ def get_details(operation_id, custom_headers:nil)
34
+ response = get_details_async(operation_id, custom_headers:custom_headers).value!
35
+ response.body unless response.nil?
36
+ end
37
+
38
+ #
39
+ # Gets details of a specific long running operation.
40
+ #
41
+ # @param operation_id [String] Operation id.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def get_details_with_http_info(operation_id, custom_headers:nil)
48
+ get_details_async(operation_id, custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Gets details of a specific long running operation.
53
+ #
54
+ # @param operation_id [String] Operation id.
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def get_details_async(operation_id, custom_headers:nil)
61
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
62
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
63
+
64
+
65
+ request_headers = {}
66
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
67
+
68
+ # Set Headers
69
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
70
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
71
+ path_template = 'operations/{operationId}'
72
+
73
+ request_url = @base_url || @client.base_url
74
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
75
+
76
+ options = {
77
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
+ path_params: {'operationId' => operation_id},
79
+ headers: request_headers.merge(custom_headers || {}),
80
+ base_url: request_url
81
+ }
82
+ promise = @client.make_request_async(:get, path_template, options)
83
+
84
+ promise = promise.then do |result|
85
+ http_response = result.response
86
+ status_code = http_response.status
87
+ response_content = http_response.body
88
+ unless status_code == 200
89
+ error_model = JSON.load(response_content)
90
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
91
+ end
92
+
93
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
94
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
95
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
96
+ # Deserialize Response
97
+ if status_code == 200
98
+ begin
99
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
100
+ result_mapper = Azure::CognitiveServices::Qnamaker::V4_0::Models::Operation.mapper()
101
+ result.body = @client.deserialize(result_mapper, parsed_response)
102
+ rescue Exception => e
103
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
104
+ end
105
+ end
106
+
107
+ result
108
+ end
109
+
110
+ promise.execute
111
+ end
112
+
113
+ end
114
+ end
@@ -136,7 +136,7 @@ module Azure::CognitiveServices::Qnamaker::V4_0
136
136
  #
137
137
  def add_telemetry
138
138
  sdk_information = 'azure_cognitiveservices_qnamaker'
139
- sdk_information = "#{sdk_information}/0.18.0"
139
+ sdk_information = "#{sdk_information}/0.18.1"
140
140
  add_user_agent_information(sdk_information)
141
141
  end
142
142
  end
@@ -1,6 +1,6 @@
1
- # encoding: utf-8
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for license information.
4
-
5
- require '4.0/generated/azure_cognitiveservices_qnamaker'
6
- require 'profiles/latest/qnamaker_latest_profile_client'
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require '4.0/generated/azure_cognitiveservices_qnamaker'
6
+ require 'profiles/latest/qnamaker_latest_profile_client'
@@ -1,7 +1,7 @@
1
- # encoding: utf-8
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for license information.
4
-
5
- module Azure end
6
- module Azure::CognitiveServices end
7
- module Azure::CognitiveServices::Qnamaker end
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure end
6
+ module Azure::CognitiveServices end
7
+ module Azure::CognitiveServices::Qnamaker end
@@ -1,38 +1,38 @@
1
- # encoding: utf-8
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for license information.
4
-
5
- require 'profiles/latest/qnamaker_module_definition'
6
- require 'profiles/latest/modules/qnamaker_profile_module'
7
-
8
- module Azure::Qnamaker::Profiles::Latest
9
- #
10
- # Client class for the Latest profile SDK.
11
- #
12
- class Client < QnamakerDataClass
13
- include MsRestAzure::Common::Configurable
14
-
15
- #
16
- # Initializes a new instance of the Client class.
17
- # @param options [Hash] hash of client options.
18
- # options = {
19
- # tenant_id: 'YOUR TENANT ID',
20
- # client_id: 'YOUR CLIENT ID',
21
- # client_secret: 'YOUR CLIENT SECRET',
22
- # subscription_id: 'YOUR SUBSCRIPTION ID',
23
- # credentials: credentials,
24
- # active_directory_settings: active_directory_settings,
25
- # base_url: 'YOUR BASE URL',
26
- # options: options
27
- # }
28
- # 'credentials' are optional and if not passed in the hash, will be obtained
29
- # from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
30
- #
31
- # Also, base_url, active_directory_settings & options are optional.
32
- #
33
- def initialize(options = {})
34
- super(options)
35
- end
36
-
37
- end
38
- end
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'profiles/latest/qnamaker_module_definition'
6
+ require 'profiles/latest/modules/qnamaker_profile_module'
7
+
8
+ module Azure::Qnamaker::Profiles::Latest
9
+ #
10
+ # Client class for the Latest profile SDK.
11
+ #
12
+ class Client < QnamakerDataClass
13
+ include MsRestAzure::Common::Configurable
14
+
15
+ #
16
+ # Initializes a new instance of the Client class.
17
+ # @param options [Hash] hash of client options.
18
+ # options = {
19
+ # tenant_id: 'YOUR TENANT ID',
20
+ # client_id: 'YOUR CLIENT ID',
21
+ # client_secret: 'YOUR CLIENT SECRET',
22
+ # subscription_id: 'YOUR SUBSCRIPTION ID',
23
+ # credentials: credentials,
24
+ # active_directory_settings: active_directory_settings,
25
+ # base_url: 'YOUR BASE URL',
26
+ # options: options
27
+ # }
28
+ # 'credentials' are optional and if not passed in the hash, will be obtained
29
+ # from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
30
+ #
31
+ # Also, base_url, active_directory_settings & options are optional.
32
+ #
33
+ def initialize(options = {})
34
+ super(options)
35
+ end
36
+
37
+ end
38
+ end
@@ -1,8 +1,8 @@
1
- # encoding: utf-8
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for license information.
4
-
5
- module Azure end
6
- module Azure::Qnamaker end
7
- module Azure::Qnamaker::Profiles end
8
- module Azure::Qnamaker::Profiles::Latest end
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure end
6
+ module Azure::Qnamaker end
7
+ module Azure::Qnamaker::Profiles end
8
+ module Azure::Qnamaker::Profiles::Latest end
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::CognitiveServices::Qnamaker
6
- VERSION = '0.18.0'
6
+ VERSION = '0.18.1'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_cognitiveservices_qnamaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-03 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.11.1
75
+ version: 0.12.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.11.1
82
+ version: 0.12.0
83
83
  description: Microsoft Azure Cognitive Services QnAMaker Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  requirements: []
168
168
  rubyforge_project:
169
- rubygems_version: 2.7.6
169
+ rubygems_version: 2.7.8
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: Official Ruby client library to consume Microsoft Azure Cognitive Services