azure_cognitiveservices_luisauthoring 0.17.3 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE.txt +20 -20
  3. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring.rb +0 -0
  4. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/apps.rb +0 -0
  5. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/azure_accounts.rb +0 -0
  6. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/examples.rb +0 -0
  7. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb +0 -0
  8. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/luis_authoring_client.rb +1 -1
  9. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb +0 -0
  10. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/app_version_setting_object.rb +0 -0
  11. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_create_object.rb +0 -0
  12. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_info_response.rb +0 -0
  13. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_publish_object.rb +0 -0
  14. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_setting_update_object.rb +0 -0
  15. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_settings.rb +0 -0
  16. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_update_object.rb +0 -0
  17. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/available_culture.rb +0 -0
  18. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/available_prebuilt_entity_model.rb +0 -0
  19. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/azure_account_info_object.rb +0 -0
  20. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/batch_label_example.rb +0 -0
  21. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/child_entity.rb +0 -0
  22. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list.rb +0 -0
  23. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list_entity_extractor.rb +0 -0
  24. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_create_object.rb +0 -0
  25. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_patch_object.rb +0 -0
  26. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_update_object.rb +0 -0
  27. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/collaborators_array.rb +0 -0
  28. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/composite_child_model_create_object.rb +0 -0
  29. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/composite_entity_extractor.rb +0 -0
  30. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/composite_entity_model.rb +0 -0
  31. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/custom_prebuilt_model.rb +0 -0
  32. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/endpoint_info.rb +0 -0
  33. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/enqueue_training_response.rb +0 -0
  34. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entities_suggestion_example.rb +0 -0
  35. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_extractor.rb +0 -0
  36. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_label.rb +0 -0
  37. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_label_object.rb +0 -0
  38. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_model_info.rb +0 -0
  39. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_prediction.rb +0 -0
  40. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_role.rb +0 -0
  41. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_role_create_object.rb +0 -0
  42. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_role_update_object.rb +0 -0
  43. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/error_response.rb +0 -0
  44. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/example_label_object.rb +0 -0
  45. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item.rb +0 -0
  46. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item_create_object.rb +0 -0
  47. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item_update_object.rb +0 -0
  48. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/feature_info_object.rb +0 -0
  49. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/features_response_object.rb +0 -0
  50. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_child_entity.rb +0 -0
  51. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_child_model_create_object.rb +0 -0
  52. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_child_model_update_object.rb +0 -0
  53. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_entity_extractor.rb +0 -0
  54. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_entity_model.rb +0 -0
  55. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_model.rb +0 -0
  56. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/intent_classifier.rb +0 -0
  57. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/intent_prediction.rb +0 -0
  58. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/intents_suggestion_example.rb +0 -0
  59. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/jsonentity.rb +0 -0
  60. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/jsonmodel_feature.rb +0 -0
  61. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/jsonregex_feature.rb +0 -0
  62. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/jsonutterance.rb +0 -0
  63. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/label_example_response.rb +0 -0
  64. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/label_text_object.rb +0 -0
  65. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/labeled_utterance.rb +0 -0
  66. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/luis_app.rb +0 -0
  67. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/model_create_object.rb +0 -0
  68. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/model_info.rb +0 -0
  69. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/model_info_response.rb +0 -0
  70. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/model_training_details.rb +0 -0
  71. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/model_training_info.rb +0 -0
  72. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/model_update_object.rb +0 -0
  73. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/operation_error.rb +0 -0
  74. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/operation_status.rb +0 -0
  75. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/operation_status_type.rb +0 -0
  76. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_any.rb +0 -0
  77. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_entity_extractor.rb +0 -0
  78. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_model_create_object.rb +0 -0
  79. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_model_update_object.rb +0 -0
  80. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_create_object.rb +0 -0
  81. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_feature_info.rb +0 -0
  82. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule.rb +0 -0
  83. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_create_object.rb +0 -0
  84. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_info.rb +0 -0
  85. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_update_object.rb +0 -0
  86. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_update_object.rb +0 -0
  87. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/personal_assistants_response.rb +0 -0
  88. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/phrase_list_feature_info.rb +0 -0
  89. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/phraselist_create_object.rb +0 -0
  90. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/phraselist_update_object.rb +0 -0
  91. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain.rb +0 -0
  92. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_create_base_object.rb +0 -0
  93. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_create_object.rb +0 -0
  94. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_item.rb +0 -0
  95. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_model_create_object.rb +0 -0
  96. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_object.rb +0 -0
  97. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_entity.rb +0 -0
  98. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_entity_extractor.rb +0 -0
  99. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/production_or_staging_endpoint_info.rb +0 -0
  100. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/publish_setting_update_object.rb +0 -0
  101. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/publish_settings.rb +0 -0
  102. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/regex_entity.rb +0 -0
  103. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/regex_entity_extractor.rb +0 -0
  104. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/regex_model_create_object.rb +0 -0
  105. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/regex_model_update_object.rb +0 -0
  106. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/sub_closed_list.rb +0 -0
  107. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/sub_closed_list_response.rb +0 -0
  108. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/task_update_object.rb +0 -0
  109. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/training_status.rb +0 -0
  110. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/user_access_list.rb +0 -0
  111. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/user_collaborator.rb +0 -0
  112. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/version_info.rb +0 -0
  113. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/word_list_base_update_object.rb +0 -0
  114. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/word_list_object.rb +0 -0
  115. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/module_definition.rb +0 -0
  116. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/pattern.rb +0 -0
  117. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/permissions.rb +0 -0
  118. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/settings.rb +0 -0
  119. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/train.rb +0 -0
  120. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/versions.rb +0 -0
  121. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring.rb +145 -0
  122. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/apps.rb +2274 -0
  123. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/azure_accounts.rb +461 -0
  124. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/examples.rb +519 -0
  125. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/features.rb +914 -0
  126. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/luis_authoring_client.rb +167 -0
  127. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/model.rb +12291 -0
  128. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/app_version_setting_object.rb +57 -0
  129. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_create_object.rb +106 -0
  130. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_info_response.rb +158 -0
  131. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_publish_object.rb +59 -0
  132. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_setting_update_object.rb +47 -0
  133. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_settings.rb +59 -0
  134. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_update_object.rb +57 -0
  135. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/available_culture.rb +57 -0
  136. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/available_prebuilt_entity_model.rb +68 -0
  137. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/azure_account_info_object.rb +68 -0
  138. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/batch_label_example.rb +70 -0
  139. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/child_entity.rb +115 -0
  140. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/child_entity_model_create_object.rb +77 -0
  141. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list.rb +85 -0
  142. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list_entity_extractor.rb +124 -0
  143. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_create_object.rb +66 -0
  144. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_patch_object.rb +55 -0
  145. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_update_object.rb +66 -0
  146. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/collaborators_array.rb +55 -0
  147. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/composite_child_model_create_object.rb +47 -0
  148. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/composite_entity_extractor.rb +124 -0
  149. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/composite_entity_model.rb +65 -0
  150. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/custom_prebuilt_model.rb +126 -0
  151. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/endpoint_info.rb +125 -0
  152. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/enqueue_training_response.rb +58 -0
  153. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entities_suggestion_example.rb +106 -0
  154. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_extractor.rb +126 -0
  155. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_label.rb +93 -0
  156. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_label_object.rb +82 -0
  157. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_model_create_object.rb +66 -0
  158. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_model_info.rb +87 -0
  159. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_model_update_object.rb +57 -0
  160. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_prediction.rb +81 -0
  161. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_role.rb +57 -0
  162. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_role_create_object.rb +46 -0
  163. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_role_update_object.rb +46 -0
  164. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/error_response.rb +65 -0
  165. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/example_label_object.rb +79 -0
  166. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item.rb +57 -0
  167. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item_create_object.rb +46 -0
  168. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item_update_object.rb +46 -0
  169. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/feature_info_object.rb +80 -0
  170. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/features_response_object.rb +75 -0
  171. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_child_entity.rb +92 -0
  172. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_child_model_update_object.rb +47 -0
  173. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_entity_extractor.rb +124 -0
  174. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_model.rb +118 -0
  175. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/intent_classifier.rb +89 -0
  176. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/intent_prediction.rb +57 -0
  177. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/intents_suggestion_example.rb +106 -0
  178. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/json_child.rb +98 -0
  179. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/json_model_feature_information.rb +58 -0
  180. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/jsonentity.rb +81 -0
  181. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/jsonmodel_feature.rb +100 -0
  182. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/jsonregex_feature.rb +68 -0
  183. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/jsonutterance.rb +77 -0
  184. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/label_example_response.rb +57 -0
  185. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/label_text_object.rb +57 -0
  186. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/labeled_utterance.rb +148 -0
  187. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/luis_app.rb +338 -0
  188. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_create_object.rb +46 -0
  189. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_feature_information.rb +58 -0
  190. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_info.rb +84 -0
  191. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_info_response.rb +197 -0
  192. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_training_details.rb +91 -0
  193. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_training_info.rb +58 -0
  194. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_update_object.rb +46 -0
  195. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/ndepth_entity_extractor.rb +146 -0
  196. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/operation_error.rb +57 -0
  197. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/operation_status.rb +58 -0
  198. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/operation_status_type.rb +17 -0
  199. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_any.rb +84 -0
  200. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_entity_extractor.rb +124 -0
  201. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_model_create_object.rb +65 -0
  202. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_model_update_object.rb +65 -0
  203. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_feature_info.rb +78 -0
  204. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule.rb +57 -0
  205. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_create_object.rb +57 -0
  206. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_info.rb +68 -0
  207. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_update_object.rb +68 -0
  208. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/personal_assistants_response.rb +74 -0
  209. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/phrase_list_feature_info.rb +99 -0
  210. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/phraselist_create_object.rb +91 -0
  211. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/phraselist_update_object.rb +107 -0
  212. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain.rb +119 -0
  213. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_create_base_object.rb +47 -0
  214. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_create_object.rb +58 -0
  215. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_item.rb +69 -0
  216. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_model_create_object.rb +58 -0
  217. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_object.rb +58 -0
  218. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_entity.rb +65 -0
  219. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_entity_extractor.rb +104 -0
  220. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/production_or_staging_endpoint_info.rb +100 -0
  221. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/publish_setting_update_object.rb +71 -0
  222. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/publish_settings.rb +80 -0
  223. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/regex_entity.rb +76 -0
  224. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/regex_entity_extractor.rb +115 -0
  225. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/regex_model_create_object.rb +57 -0
  226. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/regex_model_update_object.rb +57 -0
  227. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/sub_closed_list.rb +65 -0
  228. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/sub_closed_list_response.rb +70 -0
  229. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/task_update_object.rb +46 -0
  230. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/training_status.rb +17 -0
  231. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/user_access_list.rb +65 -0
  232. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/user_collaborator.rb +47 -0
  233. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/version_info.rb +177 -0
  234. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/word_list_base_update_object.rb +65 -0
  235. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/word_list_object.rb +65 -0
  236. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/module_definition.rb +9 -0
  237. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/pattern.rb +979 -0
  238. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/permissions.rb +435 -0
  239. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/settings.rb +257 -0
  240. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/train.rb +251 -0
  241. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/versions.rb +871 -0
  242. data/lib/azure_cognitiveservices_luisauthoring.rb +7 -6
  243. data/lib/module_definition.rb +7 -7
  244. data/lib/profiles/latest/luisauthoring_latest_profile_client.rb +38 -38
  245. data/lib/profiles/latest/luisauthoring_module_definition.rb +8 -8
  246. data/lib/profiles/latest/modules/luisauthoring_profile_module.rb +509 -497
  247. data/lib/version.rb +7 -7
  248. metadata +124 -3
@@ -0,0 +1,251 @@
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::LuisAuthoring::V3_0_preview
7
+ #
8
+ # Train
9
+ #
10
+ class Train
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Train class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [LuisAuthoringClient] reference to the LuisAuthoringClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Sends a training request for a version of a specified LUIS app. This POST
26
+ # request initiates a request asynchronously. To determine whether the training
27
+ # request is successful, submit a GET request to get training status. Note: The
28
+ # application version is not fully trained unless all the models (intents and
29
+ # entities) are trained successfully or are up to date. To verify training
30
+ # success, get the training status at least once after training is complete.
31
+ #
32
+ # @param app_id The application ID.
33
+ # @param version_id [String] The version ID.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [EnqueueTrainingResponse] operation results.
38
+ #
39
+ def train_version(app_id, version_id, custom_headers:nil)
40
+ response = train_version_async(app_id, version_id, custom_headers:custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Sends a training request for a version of a specified LUIS app. This POST
46
+ # request initiates a request asynchronously. To determine whether the training
47
+ # request is successful, submit a GET request to get training status. Note: The
48
+ # application version is not fully trained unless all the models (intents and
49
+ # entities) are trained successfully or are up to date. To verify training
50
+ # success, get the training status at least once after training is complete.
51
+ #
52
+ # @param app_id The application ID.
53
+ # @param version_id [String] The version ID.
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
56
+ #
57
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
58
+ #
59
+ def train_version_with_http_info(app_id, version_id, custom_headers:nil)
60
+ train_version_async(app_id, version_id, custom_headers:custom_headers).value!
61
+ end
62
+
63
+ #
64
+ # Sends a training request for a version of a specified LUIS app. This POST
65
+ # request initiates a request asynchronously. To determine whether the training
66
+ # request is successful, submit a GET request to get training status. Note: The
67
+ # application version is not fully trained unless all the models (intents and
68
+ # entities) are trained successfully or are up to date. To verify training
69
+ # success, get the training status at least once after training is complete.
70
+ #
71
+ # @param app_id The application ID.
72
+ # @param version_id [String] The version ID.
73
+ # @param [Hash{String => String}] A hash of custom headers that will be added
74
+ # to the HTTP request.
75
+ #
76
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
77
+ #
78
+ def train_version_async(app_id, version_id, custom_headers:nil)
79
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
80
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
81
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'apps/{appId}/versions/{versionId}/train'
91
+
92
+ request_url = @base_url || @client.base_url
93
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
94
+
95
+ options = {
96
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
97
+ path_params: {'appId' => app_id,'versionId' => version_id},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:post, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 202
108
+ error_model = JSON.load(response_content)
109
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
114
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 202
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::EnqueueTrainingResponse.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response)
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ #
133
+ # Gets the training status of all models (intents and entities) for the
134
+ # specified LUIS app. You must call the train API to train the LUIS app before
135
+ # you call this API to get training status. "appID" specifies the LUIS app ID.
136
+ # "versionId" specifies the version number of the LUIS app. For example, "0.1".
137
+ #
138
+ # @param app_id The application ID.
139
+ # @param version_id [String] The version ID.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [Array] operation results.
144
+ #
145
+ def get_status(app_id, version_id, custom_headers:nil)
146
+ response = get_status_async(app_id, version_id, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # Gets the training status of all models (intents and entities) for the
152
+ # specified LUIS app. You must call the train API to train the LUIS app before
153
+ # you call this API to get training status. "appID" specifies the LUIS app ID.
154
+ # "versionId" specifies the version number of the LUIS app. For example, "0.1".
155
+ #
156
+ # @param app_id The application ID.
157
+ # @param version_id [String] The version ID.
158
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
159
+ # will be added to the HTTP request.
160
+ #
161
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
162
+ #
163
+ def get_status_with_http_info(app_id, version_id, custom_headers:nil)
164
+ get_status_async(app_id, version_id, custom_headers:custom_headers).value!
165
+ end
166
+
167
+ #
168
+ # Gets the training status of all models (intents and entities) for the
169
+ # specified LUIS app. You must call the train API to train the LUIS app before
170
+ # you call this API to get training status. "appID" specifies the LUIS app ID.
171
+ # "versionId" specifies the version number of the LUIS app. For example, "0.1".
172
+ #
173
+ # @param app_id The application ID.
174
+ # @param version_id [String] The version ID.
175
+ # @param [Hash{String => String}] A hash of custom headers that will be added
176
+ # to the HTTP request.
177
+ #
178
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
179
+ #
180
+ def get_status_async(app_id, version_id, custom_headers:nil)
181
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
182
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
183
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
184
+
185
+
186
+ request_headers = {}
187
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
188
+
189
+ # Set Headers
190
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
191
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
192
+ path_template = 'apps/{appId}/versions/{versionId}/train'
193
+
194
+ request_url = @base_url || @client.base_url
195
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
196
+
197
+ options = {
198
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
199
+ path_params: {'appId' => app_id,'versionId' => version_id},
200
+ headers: request_headers.merge(custom_headers || {}),
201
+ base_url: request_url
202
+ }
203
+ promise = @client.make_request_async(:get, path_template, options)
204
+
205
+ promise = promise.then do |result|
206
+ http_response = result.response
207
+ status_code = http_response.status
208
+ response_content = http_response.body
209
+ unless status_code == 200
210
+ error_model = JSON.load(response_content)
211
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
212
+ end
213
+
214
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
215
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
216
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
217
+ # Deserialize Response
218
+ if status_code == 200
219
+ begin
220
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
221
+ result_mapper = {
222
+ client_side_validation: true,
223
+ required: false,
224
+ serialized_name: 'parsed_response',
225
+ type: {
226
+ name: 'Sequence',
227
+ element: {
228
+ client_side_validation: true,
229
+ required: false,
230
+ serialized_name: 'ModelTrainingInfoElementType',
231
+ type: {
232
+ name: 'Composite',
233
+ class_name: 'ModelTrainingInfo'
234
+ }
235
+ }
236
+ }
237
+ }
238
+ result.body = @client.deserialize(result_mapper, parsed_response)
239
+ rescue Exception => e
240
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
241
+ end
242
+ end
243
+
244
+ result
245
+ end
246
+
247
+ promise.execute
248
+ end
249
+
250
+ end
251
+ end
@@ -0,0 +1,871 @@
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::LuisAuthoring::V3_0_preview
7
+ #
8
+ # Versions
9
+ #
10
+ class Versions
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Versions class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [LuisAuthoringClient] reference to the LuisAuthoringClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Creates a new version from the selected version.
26
+ #
27
+ # @param app_id The application ID.
28
+ # @param version_id [String] The version ID.
29
+ # @param version_clone_object [TaskUpdateObject] A model containing the new
30
+ # version ID.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [String] operation results.
35
+ #
36
+ def clone(app_id, version_id, version_clone_object, custom_headers:nil)
37
+ response = clone_async(app_id, version_id, version_clone_object, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Creates a new version from the selected version.
43
+ #
44
+ # @param app_id The application ID.
45
+ # @param version_id [String] The version ID.
46
+ # @param version_clone_object [TaskUpdateObject] A model containing the new
47
+ # version ID.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def clone_with_http_info(app_id, version_id, version_clone_object, custom_headers:nil)
54
+ clone_async(app_id, version_id, version_clone_object, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Creates a new version from the selected version.
59
+ #
60
+ # @param app_id The application ID.
61
+ # @param version_id [String] The version ID.
62
+ # @param version_clone_object [TaskUpdateObject] A model containing the new
63
+ # version ID.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def clone_async(app_id, version_id, version_clone_object, custom_headers:nil)
70
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
71
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
72
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
73
+ fail ArgumentError, 'version_clone_object is nil' if version_clone_object.nil?
74
+
75
+
76
+ request_headers = {}
77
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
78
+
79
+ # Set Headers
80
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
81
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
82
+
83
+ # Serialize Request
84
+ request_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::TaskUpdateObject.mapper()
85
+ request_content = @client.serialize(request_mapper, version_clone_object)
86
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
87
+
88
+ path_template = 'apps/{appId}/versions/{versionId}/clone'
89
+
90
+ request_url = @base_url || @client.base_url
91
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
92
+
93
+ options = {
94
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
+ path_params: {'appId' => app_id,'versionId' => version_id},
96
+ body: request_content,
97
+ headers: request_headers.merge(custom_headers || {}),
98
+ base_url: request_url
99
+ }
100
+ promise = @client.make_request_async(:post, path_template, options)
101
+
102
+ promise = promise.then do |result|
103
+ http_response = result.response
104
+ status_code = http_response.status
105
+ response_content = http_response.body
106
+ unless status_code == 201
107
+ error_model = JSON.load(response_content)
108
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
109
+ end
110
+
111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
113
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
114
+ # Deserialize Response
115
+ if status_code == 201
116
+ begin
117
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
+ result_mapper = {
119
+ client_side_validation: true,
120
+ required: false,
121
+ serialized_name: 'parsed_response',
122
+ type: {
123
+ name: 'String'
124
+ }
125
+ }
126
+ result.body = @client.deserialize(result_mapper, parsed_response)
127
+ rescue Exception => e
128
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
129
+ end
130
+ end
131
+
132
+ result
133
+ end
134
+
135
+ promise.execute
136
+ end
137
+
138
+ #
139
+ # Gets a list of versions for this application ID.
140
+ #
141
+ # @param app_id The application ID.
142
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
143
+ # @param take [Integer] The number of entries to return. Maximum page size is
144
+ # 500. Default is 100.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [Array] operation results.
149
+ #
150
+ def list(app_id, skip:0, take:100, custom_headers:nil)
151
+ response = list_async(app_id, skip:skip, take:take, custom_headers:custom_headers).value!
152
+ response.body unless response.nil?
153
+ end
154
+
155
+ #
156
+ # Gets a list of versions for this application ID.
157
+ #
158
+ # @param app_id The application ID.
159
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
160
+ # @param take [Integer] The number of entries to return. Maximum page size is
161
+ # 500. Default is 100.
162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
+ # will be added to the HTTP request.
164
+ #
165
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
166
+ #
167
+ def list_with_http_info(app_id, skip:0, take:100, custom_headers:nil)
168
+ list_async(app_id, skip:skip, take:take, custom_headers:custom_headers).value!
169
+ end
170
+
171
+ #
172
+ # Gets a list of versions for this application ID.
173
+ #
174
+ # @param app_id The application ID.
175
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
176
+ # @param take [Integer] The number of entries to return. Maximum page size is
177
+ # 500. Default is 100.
178
+ # @param [Hash{String => String}] A hash of custom headers that will be added
179
+ # to the HTTP request.
180
+ #
181
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
182
+ #
183
+ def list_async(app_id, skip:0, take:100, custom_headers:nil)
184
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
185
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
186
+ fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0
187
+ fail ArgumentError, "'take' should satisfy the constraint - 'InclusiveMaximum': '500'" if !take.nil? && take > 500
188
+ fail ArgumentError, "'take' should satisfy the constraint - 'InclusiveMinimum': '0'" if !take.nil? && take < 0
189
+
190
+
191
+ request_headers = {}
192
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
193
+
194
+ # Set Headers
195
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
196
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
197
+ path_template = 'apps/{appId}/versions'
198
+
199
+ request_url = @base_url || @client.base_url
200
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
201
+
202
+ options = {
203
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
204
+ path_params: {'appId' => app_id},
205
+ query_params: {'skip' => skip,'take' => take},
206
+ headers: request_headers.merge(custom_headers || {}),
207
+ base_url: request_url
208
+ }
209
+ promise = @client.make_request_async(:get, path_template, options)
210
+
211
+ promise = promise.then do |result|
212
+ http_response = result.response
213
+ status_code = http_response.status
214
+ response_content = http_response.body
215
+ unless status_code == 200
216
+ error_model = JSON.load(response_content)
217
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
218
+ end
219
+
220
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
221
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
222
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
223
+ # Deserialize Response
224
+ if status_code == 200
225
+ begin
226
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
227
+ result_mapper = {
228
+ client_side_validation: true,
229
+ required: false,
230
+ serialized_name: 'parsed_response',
231
+ type: {
232
+ name: 'Sequence',
233
+ element: {
234
+ client_side_validation: true,
235
+ required: false,
236
+ serialized_name: 'VersionInfoElementType',
237
+ type: {
238
+ name: 'Composite',
239
+ class_name: 'VersionInfo'
240
+ }
241
+ }
242
+ }
243
+ }
244
+ result.body = @client.deserialize(result_mapper, parsed_response)
245
+ rescue Exception => e
246
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
247
+ end
248
+ end
249
+
250
+ result
251
+ end
252
+
253
+ promise.execute
254
+ end
255
+
256
+ #
257
+ # Gets the version information such as date created, last modified date,
258
+ # endpoint URL, count of intents and entities, training and publishing status.
259
+ #
260
+ # @param app_id The application ID.
261
+ # @param version_id [String] The version ID.
262
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
263
+ # will be added to the HTTP request.
264
+ #
265
+ # @return [VersionInfo] operation results.
266
+ #
267
+ def get(app_id, version_id, custom_headers:nil)
268
+ response = get_async(app_id, version_id, custom_headers:custom_headers).value!
269
+ response.body unless response.nil?
270
+ end
271
+
272
+ #
273
+ # Gets the version information such as date created, last modified date,
274
+ # endpoint URL, count of intents and entities, training and publishing status.
275
+ #
276
+ # @param app_id The application ID.
277
+ # @param version_id [String] The version ID.
278
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
279
+ # will be added to the HTTP request.
280
+ #
281
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
282
+ #
283
+ def get_with_http_info(app_id, version_id, custom_headers:nil)
284
+ get_async(app_id, version_id, custom_headers:custom_headers).value!
285
+ end
286
+
287
+ #
288
+ # Gets the version information such as date created, last modified date,
289
+ # endpoint URL, count of intents and entities, training and publishing status.
290
+ #
291
+ # @param app_id The application ID.
292
+ # @param version_id [String] The version ID.
293
+ # @param [Hash{String => String}] A hash of custom headers that will be added
294
+ # to the HTTP request.
295
+ #
296
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
297
+ #
298
+ def get_async(app_id, version_id, custom_headers:nil)
299
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
300
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
301
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
302
+
303
+
304
+ request_headers = {}
305
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
306
+
307
+ # Set Headers
308
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
309
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
310
+ path_template = 'apps/{appId}/versions/{versionId}/'
311
+
312
+ request_url = @base_url || @client.base_url
313
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
314
+
315
+ options = {
316
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
317
+ path_params: {'appId' => app_id,'versionId' => version_id},
318
+ headers: request_headers.merge(custom_headers || {}),
319
+ base_url: request_url
320
+ }
321
+ promise = @client.make_request_async(:get, path_template, options)
322
+
323
+ promise = promise.then do |result|
324
+ http_response = result.response
325
+ status_code = http_response.status
326
+ response_content = http_response.body
327
+ unless status_code == 200
328
+ error_model = JSON.load(response_content)
329
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
330
+ end
331
+
332
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
333
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
334
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
335
+ # Deserialize Response
336
+ if status_code == 200
337
+ begin
338
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
339
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::VersionInfo.mapper()
340
+ result.body = @client.deserialize(result_mapper, parsed_response)
341
+ rescue Exception => e
342
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
343
+ end
344
+ end
345
+
346
+ result
347
+ end
348
+
349
+ promise.execute
350
+ end
351
+
352
+ #
353
+ # Updates the name or description of the application version.
354
+ #
355
+ # @param app_id The application ID.
356
+ # @param version_id [String] The version ID.
357
+ # @param version_update_object [TaskUpdateObject] A model containing Name and
358
+ # Description of the application.
359
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
360
+ # will be added to the HTTP request.
361
+ #
362
+ # @return [OperationStatus] operation results.
363
+ #
364
+ def update(app_id, version_id, version_update_object, custom_headers:nil)
365
+ response = update_async(app_id, version_id, version_update_object, custom_headers:custom_headers).value!
366
+ response.body unless response.nil?
367
+ end
368
+
369
+ #
370
+ # Updates the name or description of the application version.
371
+ #
372
+ # @param app_id The application ID.
373
+ # @param version_id [String] The version ID.
374
+ # @param version_update_object [TaskUpdateObject] A model containing Name and
375
+ # Description of the application.
376
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
377
+ # will be added to the HTTP request.
378
+ #
379
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
380
+ #
381
+ def update_with_http_info(app_id, version_id, version_update_object, custom_headers:nil)
382
+ update_async(app_id, version_id, version_update_object, custom_headers:custom_headers).value!
383
+ end
384
+
385
+ #
386
+ # Updates the name or description of the application version.
387
+ #
388
+ # @param app_id The application ID.
389
+ # @param version_id [String] The version ID.
390
+ # @param version_update_object [TaskUpdateObject] A model containing Name and
391
+ # Description of the application.
392
+ # @param [Hash{String => String}] A hash of custom headers that will be added
393
+ # to the HTTP request.
394
+ #
395
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
396
+ #
397
+ def update_async(app_id, version_id, version_update_object, custom_headers:nil)
398
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
399
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
400
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
401
+ fail ArgumentError, 'version_update_object is nil' if version_update_object.nil?
402
+
403
+
404
+ request_headers = {}
405
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
406
+
407
+ # Set Headers
408
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
409
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
410
+
411
+ # Serialize Request
412
+ request_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::TaskUpdateObject.mapper()
413
+ request_content = @client.serialize(request_mapper, version_update_object)
414
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
415
+
416
+ path_template = 'apps/{appId}/versions/{versionId}/'
417
+
418
+ request_url = @base_url || @client.base_url
419
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
420
+
421
+ options = {
422
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
423
+ path_params: {'appId' => app_id,'versionId' => version_id},
424
+ body: request_content,
425
+ headers: request_headers.merge(custom_headers || {}),
426
+ base_url: request_url
427
+ }
428
+ promise = @client.make_request_async(:put, path_template, options)
429
+
430
+ promise = promise.then do |result|
431
+ http_response = result.response
432
+ status_code = http_response.status
433
+ response_content = http_response.body
434
+ unless status_code == 200
435
+ error_model = JSON.load(response_content)
436
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
437
+ end
438
+
439
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
440
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
441
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
442
+ # Deserialize Response
443
+ if status_code == 200
444
+ begin
445
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
446
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::OperationStatus.mapper()
447
+ result.body = @client.deserialize(result_mapper, parsed_response)
448
+ rescue Exception => e
449
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
450
+ end
451
+ end
452
+
453
+ result
454
+ end
455
+
456
+ promise.execute
457
+ end
458
+
459
+ #
460
+ # Deletes an application version.
461
+ #
462
+ # @param app_id The application ID.
463
+ # @param version_id [String] The version ID.
464
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
465
+ # will be added to the HTTP request.
466
+ #
467
+ # @return [OperationStatus] operation results.
468
+ #
469
+ def delete(app_id, version_id, custom_headers:nil)
470
+ response = delete_async(app_id, version_id, custom_headers:custom_headers).value!
471
+ response.body unless response.nil?
472
+ end
473
+
474
+ #
475
+ # Deletes an application version.
476
+ #
477
+ # @param app_id The application ID.
478
+ # @param version_id [String] The version ID.
479
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
480
+ # will be added to the HTTP request.
481
+ #
482
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
483
+ #
484
+ def delete_with_http_info(app_id, version_id, custom_headers:nil)
485
+ delete_async(app_id, version_id, custom_headers:custom_headers).value!
486
+ end
487
+
488
+ #
489
+ # Deletes an application version.
490
+ #
491
+ # @param app_id The application ID.
492
+ # @param version_id [String] The version ID.
493
+ # @param [Hash{String => String}] A hash of custom headers that will be added
494
+ # to the HTTP request.
495
+ #
496
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
497
+ #
498
+ def delete_async(app_id, version_id, custom_headers:nil)
499
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
500
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
501
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
502
+
503
+
504
+ request_headers = {}
505
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
506
+
507
+ # Set Headers
508
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
509
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
510
+ path_template = 'apps/{appId}/versions/{versionId}/'
511
+
512
+ request_url = @base_url || @client.base_url
513
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
514
+
515
+ options = {
516
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
517
+ path_params: {'appId' => app_id,'versionId' => version_id},
518
+ headers: request_headers.merge(custom_headers || {}),
519
+ base_url: request_url
520
+ }
521
+ promise = @client.make_request_async(:delete, path_template, options)
522
+
523
+ promise = promise.then do |result|
524
+ http_response = result.response
525
+ status_code = http_response.status
526
+ response_content = http_response.body
527
+ unless status_code == 200
528
+ error_model = JSON.load(response_content)
529
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
530
+ end
531
+
532
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
533
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
534
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
535
+ # Deserialize Response
536
+ if status_code == 200
537
+ begin
538
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
539
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::OperationStatus.mapper()
540
+ result.body = @client.deserialize(result_mapper, parsed_response)
541
+ rescue Exception => e
542
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
543
+ end
544
+ end
545
+
546
+ result
547
+ end
548
+
549
+ promise.execute
550
+ end
551
+
552
+ #
553
+ # Exports a LUIS application to JSON format.
554
+ #
555
+ # @param app_id The application ID.
556
+ # @param version_id [String] The version ID.
557
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
558
+ # will be added to the HTTP request.
559
+ #
560
+ # @return [LuisApp] operation results.
561
+ #
562
+ def export(app_id, version_id, custom_headers:nil)
563
+ response = export_async(app_id, version_id, custom_headers:custom_headers).value!
564
+ response.body unless response.nil?
565
+ end
566
+
567
+ #
568
+ # Exports a LUIS application to JSON format.
569
+ #
570
+ # @param app_id The application ID.
571
+ # @param version_id [String] The version ID.
572
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
573
+ # will be added to the HTTP request.
574
+ #
575
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
576
+ #
577
+ def export_with_http_info(app_id, version_id, custom_headers:nil)
578
+ export_async(app_id, version_id, custom_headers:custom_headers).value!
579
+ end
580
+
581
+ #
582
+ # Exports a LUIS application to JSON format.
583
+ #
584
+ # @param app_id The application ID.
585
+ # @param version_id [String] The version ID.
586
+ # @param [Hash{String => String}] A hash of custom headers that will be added
587
+ # to the HTTP request.
588
+ #
589
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
590
+ #
591
+ def export_async(app_id, version_id, custom_headers:nil)
592
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
593
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
594
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
595
+
596
+
597
+ request_headers = {}
598
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
599
+
600
+ # Set Headers
601
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
602
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
603
+ path_template = 'apps/{appId}/versions/{versionId}/export'
604
+
605
+ request_url = @base_url || @client.base_url
606
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
607
+
608
+ options = {
609
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
610
+ path_params: {'appId' => app_id,'versionId' => version_id},
611
+ headers: request_headers.merge(custom_headers || {}),
612
+ base_url: request_url
613
+ }
614
+ promise = @client.make_request_async(:get, path_template, options)
615
+
616
+ promise = promise.then do |result|
617
+ http_response = result.response
618
+ status_code = http_response.status
619
+ response_content = http_response.body
620
+ unless status_code == 200
621
+ error_model = JSON.load(response_content)
622
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
623
+ end
624
+
625
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
626
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
627
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
628
+ # Deserialize Response
629
+ if status_code == 200
630
+ begin
631
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
632
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::LuisApp.mapper()
633
+ result.body = @client.deserialize(result_mapper, parsed_response)
634
+ rescue Exception => e
635
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
636
+ end
637
+ end
638
+
639
+ result
640
+ end
641
+
642
+ promise.execute
643
+ end
644
+
645
+ #
646
+ # Imports a new version into a LUIS application.
647
+ #
648
+ # @param app_id The application ID.
649
+ # @param luis_app [LuisApp] A LUIS application structure.
650
+ # @param version_id [String] The new versionId to import. If not specified, the
651
+ # versionId will be read from the imported object.
652
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
653
+ # will be added to the HTTP request.
654
+ #
655
+ # @return [String] operation results.
656
+ #
657
+ def import(app_id, luis_app, version_id:nil, custom_headers:nil)
658
+ response = import_async(app_id, luis_app, version_id:version_id, custom_headers:custom_headers).value!
659
+ response.body unless response.nil?
660
+ end
661
+
662
+ #
663
+ # Imports a new version into a LUIS application.
664
+ #
665
+ # @param app_id The application ID.
666
+ # @param luis_app [LuisApp] A LUIS application structure.
667
+ # @param version_id [String] The new versionId to import. If not specified, the
668
+ # versionId will be read from the imported object.
669
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
670
+ # will be added to the HTTP request.
671
+ #
672
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
673
+ #
674
+ def import_with_http_info(app_id, luis_app, version_id:nil, custom_headers:nil)
675
+ import_async(app_id, luis_app, version_id:version_id, custom_headers:custom_headers).value!
676
+ end
677
+
678
+ #
679
+ # Imports a new version into a LUIS application.
680
+ #
681
+ # @param app_id The application ID.
682
+ # @param luis_app [LuisApp] A LUIS application structure.
683
+ # @param version_id [String] The new versionId to import. If not specified, the
684
+ # versionId will be read from the imported object.
685
+ # @param [Hash{String => String}] A hash of custom headers that will be added
686
+ # to the HTTP request.
687
+ #
688
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
689
+ #
690
+ def import_async(app_id, luis_app, version_id:nil, custom_headers:nil)
691
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
692
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
693
+ fail ArgumentError, 'luis_app is nil' if luis_app.nil?
694
+
695
+
696
+ request_headers = {}
697
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
698
+
699
+ # Set Headers
700
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
701
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
702
+
703
+ # Serialize Request
704
+ request_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::LuisApp.mapper()
705
+ request_content = @client.serialize(request_mapper, luis_app)
706
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
707
+
708
+ path_template = 'apps/{appId}/versions/import'
709
+
710
+ request_url = @base_url || @client.base_url
711
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
712
+
713
+ options = {
714
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
715
+ path_params: {'appId' => app_id},
716
+ query_params: {'versionId' => version_id},
717
+ body: request_content,
718
+ headers: request_headers.merge(custom_headers || {}),
719
+ base_url: request_url
720
+ }
721
+ promise = @client.make_request_async(:post, path_template, options)
722
+
723
+ promise = promise.then do |result|
724
+ http_response = result.response
725
+ status_code = http_response.status
726
+ response_content = http_response.body
727
+ unless status_code == 201
728
+ error_model = JSON.load(response_content)
729
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
730
+ end
731
+
732
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
733
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
734
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
735
+ # Deserialize Response
736
+ if status_code == 201
737
+ begin
738
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
739
+ result_mapper = {
740
+ client_side_validation: true,
741
+ required: false,
742
+ serialized_name: 'parsed_response',
743
+ type: {
744
+ name: 'String'
745
+ }
746
+ }
747
+ result.body = @client.deserialize(result_mapper, parsed_response)
748
+ rescue Exception => e
749
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
750
+ end
751
+ end
752
+
753
+ result
754
+ end
755
+
756
+ promise.execute
757
+ end
758
+
759
+ #
760
+ # Deleted an unlabelled utterance in a version of the application.
761
+ #
762
+ # @param app_id The application ID.
763
+ # @param version_id [String] The version ID.
764
+ # @param utterance [String] The utterance text to delete.
765
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
766
+ # will be added to the HTTP request.
767
+ #
768
+ # @return [OperationStatus] operation results.
769
+ #
770
+ def delete_unlabelled_utterance(app_id, version_id, utterance, custom_headers:nil)
771
+ response = delete_unlabelled_utterance_async(app_id, version_id, utterance, custom_headers:custom_headers).value!
772
+ response.body unless response.nil?
773
+ end
774
+
775
+ #
776
+ # Deleted an unlabelled utterance in a version of the application.
777
+ #
778
+ # @param app_id The application ID.
779
+ # @param version_id [String] The version ID.
780
+ # @param utterance [String] The utterance text to delete.
781
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
782
+ # will be added to the HTTP request.
783
+ #
784
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
785
+ #
786
+ def delete_unlabelled_utterance_with_http_info(app_id, version_id, utterance, custom_headers:nil)
787
+ delete_unlabelled_utterance_async(app_id, version_id, utterance, custom_headers:custom_headers).value!
788
+ end
789
+
790
+ #
791
+ # Deleted an unlabelled utterance in a version of the application.
792
+ #
793
+ # @param app_id The application ID.
794
+ # @param version_id [String] The version ID.
795
+ # @param utterance [String] The utterance text to delete.
796
+ # @param [Hash{String => String}] A hash of custom headers that will be added
797
+ # to the HTTP request.
798
+ #
799
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
800
+ #
801
+ def delete_unlabelled_utterance_async(app_id, version_id, utterance, custom_headers:nil)
802
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
803
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
804
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
805
+ fail ArgumentError, 'utterance is nil' if utterance.nil?
806
+
807
+
808
+ request_headers = {}
809
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
810
+
811
+ # Set Headers
812
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
813
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
814
+
815
+ # Serialize Request
816
+ request_mapper = {
817
+ client_side_validation: true,
818
+ required: true,
819
+ serialized_name: 'utterance',
820
+ type: {
821
+ name: 'String'
822
+ }
823
+ }
824
+ request_content = @client.serialize(request_mapper, utterance)
825
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
826
+
827
+ path_template = 'apps/{appId}/versions/{versionId}/suggest'
828
+
829
+ request_url = @base_url || @client.base_url
830
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
831
+
832
+ options = {
833
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
834
+ path_params: {'appId' => app_id,'versionId' => version_id},
835
+ body: request_content,
836
+ headers: request_headers.merge(custom_headers || {}),
837
+ base_url: request_url
838
+ }
839
+ promise = @client.make_request_async(:delete, path_template, options)
840
+
841
+ promise = promise.then do |result|
842
+ http_response = result.response
843
+ status_code = http_response.status
844
+ response_content = http_response.body
845
+ unless status_code == 200
846
+ error_model = JSON.load(response_content)
847
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
848
+ end
849
+
850
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
851
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
852
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
853
+ # Deserialize Response
854
+ if status_code == 200
855
+ begin
856
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
857
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::OperationStatus.mapper()
858
+ result.body = @client.deserialize(result_mapper, parsed_response)
859
+ rescue Exception => e
860
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
861
+ end
862
+ end
863
+
864
+ result
865
+ end
866
+
867
+ promise.execute
868
+ end
869
+
870
+ end
871
+ end