azure_cognitiveservices_luisauthoring 0.17.1 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/apps.rb +122 -60
  3. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/azure_accounts.rb +43 -35
  4. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/examples.rb +32 -21
  5. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/features.rb +161 -18
  6. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/luis_authoring_client.rb +1 -1
  7. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/model.rb +766 -452
  8. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_info_response.rb +4 -4
  9. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_setting_update_object.rb +2 -2
  10. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/application_settings.rb +2 -1
  11. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/azure_account_info_object.rb +4 -4
  12. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/batch_label_example.rb +1 -1
  13. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list.rb +3 -3
  14. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list_entity_extractor.rb +6 -6
  15. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_create_object.rb +2 -2
  16. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_patch_object.rb +1 -1
  17. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_update_object.rb +2 -2
  18. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/composite_entity_extractor.rb +3 -3
  19. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/composite_entity_model.rb +1 -1
  20. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/custom_prebuilt_model.rb +3 -3
  21. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entities_suggestion_example.rb +2 -2
  22. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_extractor.rb +3 -3
  23. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_label.rb +22 -0
  24. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/entity_label_object.rb +11 -0
  25. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/example_label_object.rb +5 -4
  26. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item.rb +1 -1
  27. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item_create_object.rb +1 -1
  28. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item_update_object.rb +1 -1
  29. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_child_entity.rb +3 -3
  30. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_entity_extractor.rb +3 -3
  31. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_entity_model.rb +1 -1
  32. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/intents_suggestion_example.rb +3 -3
  33. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/jsonentity.rb +11 -0
  34. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/jsonmodel_feature.rb +7 -10
  35. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/label_example_response.rb +2 -2
  36. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/label_text_object.rb +1 -1
  37. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/labeled_utterance.rb +2 -2
  38. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/luis_app.rb +2 -2
  39. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/model_info.rb +3 -3
  40. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/model_info_response.rb +5 -5
  41. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_entity_extractor.rb +3 -3
  42. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/phraselist_create_object.rb +8 -11
  43. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_entity_extractor.rb +3 -3
  44. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/publish_settings.rb +3 -5
  45. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/regex_entity_extractor.rb +5 -5
  46. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/regex_model_create_object.rb +2 -2
  47. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/regex_model_update_object.rb +2 -2
  48. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/sub_closed_list.rb +1 -1
  49. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/sub_closed_list_response.rb +1 -1
  50. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/word_list_base_update_object.rb +1 -1
  51. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/models/word_list_object.rb +1 -1
  52. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/pattern.rb +50 -34
  53. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/permissions.rb +17 -9
  54. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/settings.rb +33 -13
  55. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/train.rb +4 -0
  56. data/lib/2.0/generated/azure_cognitiveservices_luisauthoring/versions.rb +37 -20
  57. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring.rb +147 -0
  58. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/apps.rb +2511 -0
  59. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/azure_accounts.rb +489 -0
  60. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/examples.rb +519 -0
  61. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/features.rb +914 -0
  62. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/luis_authoring_client.rb +167 -0
  63. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/model.rb +12291 -0
  64. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/app_version_setting_object.rb +57 -0
  65. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_create_object.rb +106 -0
  66. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_info_response.rb +158 -0
  67. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_publish_object.rb +59 -0
  68. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_setting_update_object.rb +47 -0
  69. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_settings.rb +59 -0
  70. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/application_update_object.rb +57 -0
  71. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/available_culture.rb +57 -0
  72. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/available_prebuilt_entity_model.rb +68 -0
  73. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/azure_account_info_object.rb +68 -0
  74. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/batch_label_example.rb +70 -0
  75. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/child_entity.rb +115 -0
  76. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/child_entity_model_create_object.rb +77 -0
  77. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list.rb +85 -0
  78. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list_entity_extractor.rb +124 -0
  79. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_create_object.rb +66 -0
  80. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_patch_object.rb +55 -0
  81. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/closed_list_model_update_object.rb +66 -0
  82. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/collaborators_array.rb +55 -0
  83. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/composite_child_model_create_object.rb +47 -0
  84. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/composite_entity_extractor.rb +124 -0
  85. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/composite_entity_model.rb +65 -0
  86. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/custom_prebuilt_model.rb +126 -0
  87. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/endpoint_info.rb +125 -0
  88. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/enqueue_training_response.rb +58 -0
  89. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entities_suggestion_example.rb +106 -0
  90. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_extractor.rb +126 -0
  91. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_label.rb +93 -0
  92. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_label_object.rb +82 -0
  93. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_model_create_object.rb +66 -0
  94. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_model_info.rb +87 -0
  95. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_model_update_object.rb +57 -0
  96. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_prediction.rb +81 -0
  97. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_role.rb +57 -0
  98. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_role_create_object.rb +46 -0
  99. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/entity_role_update_object.rb +46 -0
  100. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/error_response.rb +65 -0
  101. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/example_label_object.rb +79 -0
  102. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item.rb +57 -0
  103. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item_create_object.rb +46 -0
  104. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/explicit_list_item_update_object.rb +46 -0
  105. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/feature_info_object.rb +80 -0
  106. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/features_response_object.rb +75 -0
  107. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_child_entity.rb +92 -0
  108. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_child_model_update_object.rb +47 -0
  109. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_entity_extractor.rb +124 -0
  110. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_model.rb +118 -0
  111. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/hierarchical_model_v2.rb +97 -0
  112. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/intent_classifier.rb +89 -0
  113. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/intent_prediction.rb +57 -0
  114. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/intents_suggestion_example.rb +106 -0
  115. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/json_child.rb +98 -0
  116. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/json_model_feature_information.rb +58 -0
  117. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/jsonentity.rb +81 -0
  118. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/jsonmodel_feature.rb +100 -0
  119. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/jsonregex_feature.rb +68 -0
  120. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/jsonutterance.rb +77 -0
  121. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/label_example_response.rb +57 -0
  122. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/label_text_object.rb +57 -0
  123. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/labeled_utterance.rb +148 -0
  124. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/luis_app.rb +338 -0
  125. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/luis_app_v2.rb +329 -0
  126. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_create_object.rb +46 -0
  127. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_feature_information.rb +58 -0
  128. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_info.rb +84 -0
  129. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_info_response.rb +197 -0
  130. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_training_details.rb +91 -0
  131. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_training_info.rb +58 -0
  132. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/model_update_object.rb +46 -0
  133. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/ndepth_entity_extractor.rb +146 -0
  134. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/operation_error.rb +57 -0
  135. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/operation_status.rb +58 -0
  136. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/operation_status_type.rb +17 -0
  137. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_any.rb +84 -0
  138. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_entity_extractor.rb +124 -0
  139. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_model_create_object.rb +65 -0
  140. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_any_model_update_object.rb +65 -0
  141. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_feature_info.rb +78 -0
  142. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule.rb +57 -0
  143. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_create_object.rb +57 -0
  144. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_info.rb +68 -0
  145. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/pattern_rule_update_object.rb +68 -0
  146. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/personal_assistants_response.rb +74 -0
  147. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/phrase_list_feature_info.rb +99 -0
  148. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/phraselist_create_object.rb +91 -0
  149. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/phraselist_update_object.rb +107 -0
  150. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain.rb +119 -0
  151. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_create_base_object.rb +47 -0
  152. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_create_object.rb +58 -0
  153. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_item.rb +69 -0
  154. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_model_create_object.rb +58 -0
  155. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_domain_object.rb +58 -0
  156. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_entity.rb +65 -0
  157. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/prebuilt_entity_extractor.rb +104 -0
  158. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/production_or_staging_endpoint_info.rb +100 -0
  159. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/publish_setting_update_object.rb +71 -0
  160. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/publish_settings.rb +80 -0
  161. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/regex_entity.rb +76 -0
  162. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/regex_entity_extractor.rb +115 -0
  163. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/regex_model_create_object.rb +57 -0
  164. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/regex_model_update_object.rb +57 -0
  165. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/sub_closed_list.rb +65 -0
  166. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/sub_closed_list_response.rb +70 -0
  167. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/task_update_object.rb +46 -0
  168. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/training_status.rb +17 -0
  169. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/user_access_list.rb +65 -0
  170. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/user_collaborator.rb +47 -0
  171. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/version_info.rb +177 -0
  172. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/word_list_base_update_object.rb +65 -0
  173. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/models/word_list_object.rb +65 -0
  174. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/module_definition.rb +9 -0
  175. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/pattern.rb +979 -0
  176. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/permissions.rb +435 -0
  177. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/settings.rb +257 -0
  178. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/train.rb +251 -0
  179. data/lib/3.0-preview/generated/azure_cognitiveservices_luisauthoring/versions.rb +1211 -0
  180. data/lib/azure_cognitiveservices_luisauthoring.rb +1 -0
  181. data/lib/profiles/latest/modules/luisauthoring_profile_module.rb +283 -263
  182. data/lib/version.rb +1 -1
  183. metadata +128 -5
@@ -0,0 +1,65 @@
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
+ module Models
8
+ #
9
+ # Object model for updating one of the list entity's sublists.
10
+ #
11
+ class WordListBaseUpdateObject
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The standard form that the list represents.
16
+ attr_accessor :canonical_form
17
+
18
+ # @return [Array<String>] List of synonym words.
19
+ attr_accessor :list
20
+
21
+
22
+ #
23
+ # Mapper for WordListBaseUpdateObject class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'WordListBaseUpdateObject',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'WordListBaseUpdateObject',
34
+ model_properties: {
35
+ canonical_form: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'canonicalForm',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ list: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'list',
47
+ type: {
48
+ name: 'Sequence',
49
+ element: {
50
+ client_side_validation: true,
51
+ required: false,
52
+ serialized_name: 'StringElementType',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,65 @@
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
+ module Models
8
+ #
9
+ # Sublist of items for a list entity.
10
+ #
11
+ class WordListObject
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The standard form that the list represents.
16
+ attr_accessor :canonical_form
17
+
18
+ # @return [Array<String>] List of synonym words.
19
+ attr_accessor :list
20
+
21
+
22
+ #
23
+ # Mapper for WordListObject class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'WordListObject',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'WordListObject',
34
+ model_properties: {
35
+ canonical_form: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'canonicalForm',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ list: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'list',
47
+ type: {
48
+ name: 'Sequence',
49
+ element: {
50
+ client_side_validation: true,
51
+ required: false,
52
+ serialized_name: 'StringElementType',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +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::LuisAuthoring end
9
+ module Azure::CognitiveServices::LuisAuthoring::V3_0_preview end
@@ -0,0 +1,979 @@
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
+ # Pattern
9
+ #
10
+ class Pattern
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Pattern 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
+ # Adds a pattern to a version of the application.
26
+ #
27
+ # @param app_id The application ID.
28
+ # @param version_id [String] The version ID.
29
+ # @param pattern [PatternRuleCreateObject] The input pattern.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [PatternRuleInfo] operation results.
34
+ #
35
+ def add_pattern(app_id, version_id, pattern, custom_headers:nil)
36
+ response = add_pattern_async(app_id, version_id, pattern, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Adds a pattern to a version of the application.
42
+ #
43
+ # @param app_id The application ID.
44
+ # @param version_id [String] The version ID.
45
+ # @param pattern [PatternRuleCreateObject] The input pattern.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def add_pattern_with_http_info(app_id, version_id, pattern, custom_headers:nil)
52
+ add_pattern_async(app_id, version_id, pattern, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Adds a pattern to a version of the application.
57
+ #
58
+ # @param app_id The application ID.
59
+ # @param version_id [String] The version ID.
60
+ # @param pattern [PatternRuleCreateObject] The input pattern.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def add_pattern_async(app_id, version_id, pattern, custom_headers:nil)
67
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
68
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
69
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
70
+ fail ArgumentError, 'pattern is nil' if pattern.nil?
71
+
72
+
73
+ request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
75
+
76
+ # Set Headers
77
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
+
80
+ # Serialize Request
81
+ request_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::PatternRuleCreateObject.mapper()
82
+ request_content = @client.serialize(request_mapper, pattern)
83
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
84
+
85
+ path_template = 'apps/{appId}/versions/{versionId}/patternrule'
86
+
87
+ request_url = @base_url || @client.base_url
88
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
89
+
90
+ options = {
91
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
92
+ path_params: {'appId' => app_id,'versionId' => version_id},
93
+ body: request_content,
94
+ headers: request_headers.merge(custom_headers || {}),
95
+ base_url: request_url
96
+ }
97
+ promise = @client.make_request_async(:post, path_template, options)
98
+
99
+ promise = promise.then do |result|
100
+ http_response = result.response
101
+ status_code = http_response.status
102
+ response_content = http_response.body
103
+ unless status_code == 201
104
+ error_model = JSON.load(response_content)
105
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
106
+ end
107
+
108
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
109
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
110
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
111
+ # Deserialize Response
112
+ if status_code == 201
113
+ begin
114
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
115
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::PatternRuleInfo.mapper()
116
+ result.body = @client.deserialize(result_mapper, parsed_response)
117
+ rescue Exception => e
118
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
119
+ end
120
+ end
121
+
122
+ result
123
+ end
124
+
125
+ promise.execute
126
+ end
127
+
128
+ #
129
+ # Gets patterns in a version of the application.
130
+ #
131
+ # @param app_id The application ID.
132
+ # @param version_id [String] The version ID.
133
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
134
+ # @param take [Integer] The number of entries to return. Maximum page size is
135
+ # 500. Default is 100.
136
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
137
+ # will be added to the HTTP request.
138
+ #
139
+ # @return [Array] operation results.
140
+ #
141
+ def list_patterns(app_id, version_id, skip:0, take:100, custom_headers:nil)
142
+ response = list_patterns_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value!
143
+ response.body unless response.nil?
144
+ end
145
+
146
+ #
147
+ # Gets patterns in a version of the application.
148
+ #
149
+ # @param app_id The application ID.
150
+ # @param version_id [String] The version ID.
151
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
152
+ # @param take [Integer] The number of entries to return. Maximum page size is
153
+ # 500. Default is 100.
154
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
155
+ # will be added to the HTTP request.
156
+ #
157
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
158
+ #
159
+ def list_patterns_with_http_info(app_id, version_id, skip:0, take:100, custom_headers:nil)
160
+ list_patterns_async(app_id, version_id, skip:skip, take:take, custom_headers:custom_headers).value!
161
+ end
162
+
163
+ #
164
+ # Gets patterns in a version of the application.
165
+ #
166
+ # @param app_id The application ID.
167
+ # @param version_id [String] The version ID.
168
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
169
+ # @param take [Integer] The number of entries to return. Maximum page size is
170
+ # 500. Default is 100.
171
+ # @param [Hash{String => String}] A hash of custom headers that will be added
172
+ # to the HTTP request.
173
+ #
174
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
175
+ #
176
+ def list_patterns_async(app_id, version_id, skip:0, take:100, custom_headers:nil)
177
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
178
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
179
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
180
+ fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0
181
+ fail ArgumentError, "'take' should satisfy the constraint - 'InclusiveMaximum': '500'" if !take.nil? && take > 500
182
+ fail ArgumentError, "'take' should satisfy the constraint - 'InclusiveMinimum': '0'" if !take.nil? && take < 0
183
+
184
+
185
+ request_headers = {}
186
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
187
+
188
+ # Set Headers
189
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
190
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
191
+ path_template = 'apps/{appId}/versions/{versionId}/patternrules'
192
+
193
+ request_url = @base_url || @client.base_url
194
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
195
+
196
+ options = {
197
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
198
+ path_params: {'appId' => app_id,'versionId' => version_id},
199
+ query_params: {'skip' => skip,'take' => take},
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: 'PatternRuleInfoElementType',
231
+ type: {
232
+ name: 'Composite',
233
+ class_name: 'PatternRuleInfo'
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
+ #
251
+ # Updates patterns in a version of the application.
252
+ #
253
+ # @param app_id The application ID.
254
+ # @param version_id [String] The version ID.
255
+ # @param patterns [Array<PatternRuleUpdateObject>] An array represents the
256
+ # patterns.
257
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
258
+ # will be added to the HTTP request.
259
+ #
260
+ # @return [Array] operation results.
261
+ #
262
+ def update_patterns(app_id, version_id, patterns, custom_headers:nil)
263
+ response = update_patterns_async(app_id, version_id, patterns, custom_headers:custom_headers).value!
264
+ response.body unless response.nil?
265
+ end
266
+
267
+ #
268
+ # Updates patterns in a version of the application.
269
+ #
270
+ # @param app_id The application ID.
271
+ # @param version_id [String] The version ID.
272
+ # @param patterns [Array<PatternRuleUpdateObject>] An array represents the
273
+ # patterns.
274
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
275
+ # will be added to the HTTP request.
276
+ #
277
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
278
+ #
279
+ def update_patterns_with_http_info(app_id, version_id, patterns, custom_headers:nil)
280
+ update_patterns_async(app_id, version_id, patterns, custom_headers:custom_headers).value!
281
+ end
282
+
283
+ #
284
+ # Updates patterns in a version of the application.
285
+ #
286
+ # @param app_id The application ID.
287
+ # @param version_id [String] The version ID.
288
+ # @param patterns [Array<PatternRuleUpdateObject>] An array represents the
289
+ # patterns.
290
+ # @param [Hash{String => String}] A hash of custom headers that will be added
291
+ # to the HTTP request.
292
+ #
293
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
294
+ #
295
+ def update_patterns_async(app_id, version_id, patterns, custom_headers:nil)
296
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
297
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
298
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
299
+ fail ArgumentError, 'patterns is nil' if patterns.nil?
300
+
301
+
302
+ request_headers = {}
303
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
304
+
305
+ # Set Headers
306
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
307
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
308
+
309
+ # Serialize Request
310
+ request_mapper = {
311
+ client_side_validation: true,
312
+ required: true,
313
+ serialized_name: 'patterns',
314
+ type: {
315
+ name: 'Sequence',
316
+ element: {
317
+ client_side_validation: true,
318
+ required: false,
319
+ serialized_name: 'PatternRuleUpdateObjectElementType',
320
+ type: {
321
+ name: 'Composite',
322
+ class_name: 'PatternRuleUpdateObject'
323
+ }
324
+ }
325
+ }
326
+ }
327
+ request_content = @client.serialize(request_mapper, patterns)
328
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
329
+
330
+ path_template = 'apps/{appId}/versions/{versionId}/patternrules'
331
+
332
+ request_url = @base_url || @client.base_url
333
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
334
+
335
+ options = {
336
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
337
+ path_params: {'appId' => app_id,'versionId' => version_id},
338
+ body: request_content,
339
+ headers: request_headers.merge(custom_headers || {}),
340
+ base_url: request_url
341
+ }
342
+ promise = @client.make_request_async(:put, path_template, options)
343
+
344
+ promise = promise.then do |result|
345
+ http_response = result.response
346
+ status_code = http_response.status
347
+ response_content = http_response.body
348
+ unless status_code == 200
349
+ error_model = JSON.load(response_content)
350
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
351
+ end
352
+
353
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
354
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
355
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
356
+ # Deserialize Response
357
+ if status_code == 200
358
+ begin
359
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
360
+ result_mapper = {
361
+ client_side_validation: true,
362
+ required: false,
363
+ serialized_name: 'parsed_response',
364
+ type: {
365
+ name: 'Sequence',
366
+ element: {
367
+ client_side_validation: true,
368
+ required: false,
369
+ serialized_name: 'PatternRuleInfoElementType',
370
+ type: {
371
+ name: 'Composite',
372
+ class_name: 'PatternRuleInfo'
373
+ }
374
+ }
375
+ }
376
+ }
377
+ result.body = @client.deserialize(result_mapper, parsed_response)
378
+ rescue Exception => e
379
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
380
+ end
381
+ end
382
+
383
+ result
384
+ end
385
+
386
+ promise.execute
387
+ end
388
+
389
+ #
390
+ # Adds a batch of patterns in a version of the application.
391
+ #
392
+ # @param app_id The application ID.
393
+ # @param version_id [String] The version ID.
394
+ # @param patterns [Array<PatternRuleCreateObject>] A JSON array containing
395
+ # patterns.
396
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
397
+ # will be added to the HTTP request.
398
+ #
399
+ # @return [Array] operation results.
400
+ #
401
+ def batch_add_patterns(app_id, version_id, patterns, custom_headers:nil)
402
+ response = batch_add_patterns_async(app_id, version_id, patterns, custom_headers:custom_headers).value!
403
+ response.body unless response.nil?
404
+ end
405
+
406
+ #
407
+ # Adds a batch of patterns in a version of the application.
408
+ #
409
+ # @param app_id The application ID.
410
+ # @param version_id [String] The version ID.
411
+ # @param patterns [Array<PatternRuleCreateObject>] A JSON array containing
412
+ # patterns.
413
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
414
+ # will be added to the HTTP request.
415
+ #
416
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
417
+ #
418
+ def batch_add_patterns_with_http_info(app_id, version_id, patterns, custom_headers:nil)
419
+ batch_add_patterns_async(app_id, version_id, patterns, custom_headers:custom_headers).value!
420
+ end
421
+
422
+ #
423
+ # Adds a batch of patterns in a version of the application.
424
+ #
425
+ # @param app_id The application ID.
426
+ # @param version_id [String] The version ID.
427
+ # @param patterns [Array<PatternRuleCreateObject>] A JSON array containing
428
+ # patterns.
429
+ # @param [Hash{String => String}] A hash of custom headers that will be added
430
+ # to the HTTP request.
431
+ #
432
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
433
+ #
434
+ def batch_add_patterns_async(app_id, version_id, patterns, custom_headers:nil)
435
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
436
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
437
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
438
+ fail ArgumentError, 'patterns is nil' if patterns.nil?
439
+
440
+
441
+ request_headers = {}
442
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
443
+
444
+ # Set Headers
445
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
446
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
447
+
448
+ # Serialize Request
449
+ request_mapper = {
450
+ client_side_validation: true,
451
+ required: true,
452
+ serialized_name: 'patterns',
453
+ type: {
454
+ name: 'Sequence',
455
+ element: {
456
+ client_side_validation: true,
457
+ required: false,
458
+ serialized_name: 'PatternRuleCreateObjectElementType',
459
+ type: {
460
+ name: 'Composite',
461
+ class_name: 'PatternRuleCreateObject'
462
+ }
463
+ }
464
+ }
465
+ }
466
+ request_content = @client.serialize(request_mapper, patterns)
467
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
468
+
469
+ path_template = 'apps/{appId}/versions/{versionId}/patternrules'
470
+
471
+ request_url = @base_url || @client.base_url
472
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
473
+
474
+ options = {
475
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
476
+ path_params: {'appId' => app_id,'versionId' => version_id},
477
+ body: request_content,
478
+ headers: request_headers.merge(custom_headers || {}),
479
+ base_url: request_url
480
+ }
481
+ promise = @client.make_request_async(:post, path_template, options)
482
+
483
+ promise = promise.then do |result|
484
+ http_response = result.response
485
+ status_code = http_response.status
486
+ response_content = http_response.body
487
+ unless status_code == 201
488
+ error_model = JSON.load(response_content)
489
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
490
+ end
491
+
492
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
493
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
494
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
495
+ # Deserialize Response
496
+ if status_code == 201
497
+ begin
498
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
499
+ result_mapper = {
500
+ client_side_validation: true,
501
+ required: false,
502
+ serialized_name: 'parsed_response',
503
+ type: {
504
+ name: 'Sequence',
505
+ element: {
506
+ client_side_validation: true,
507
+ required: false,
508
+ serialized_name: 'PatternRuleInfoElementType',
509
+ type: {
510
+ name: 'Composite',
511
+ class_name: 'PatternRuleInfo'
512
+ }
513
+ }
514
+ }
515
+ }
516
+ result.body = @client.deserialize(result_mapper, parsed_response)
517
+ rescue Exception => e
518
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
519
+ end
520
+ end
521
+
522
+ result
523
+ end
524
+
525
+ promise.execute
526
+ end
527
+
528
+ #
529
+ # Deletes a list of patterns in a version of the application.
530
+ #
531
+ # @param app_id The application ID.
532
+ # @param version_id [String] The version ID.
533
+ # @param pattern_ids The patterns IDs.
534
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
535
+ # will be added to the HTTP request.
536
+ #
537
+ # @return [OperationStatus] operation results.
538
+ #
539
+ def delete_patterns(app_id, version_id, pattern_ids, custom_headers:nil)
540
+ response = delete_patterns_async(app_id, version_id, pattern_ids, custom_headers:custom_headers).value!
541
+ response.body unless response.nil?
542
+ end
543
+
544
+ #
545
+ # Deletes a list of patterns in a version of the application.
546
+ #
547
+ # @param app_id The application ID.
548
+ # @param version_id [String] The version ID.
549
+ # @param pattern_ids The patterns IDs.
550
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
551
+ # will be added to the HTTP request.
552
+ #
553
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
554
+ #
555
+ def delete_patterns_with_http_info(app_id, version_id, pattern_ids, custom_headers:nil)
556
+ delete_patterns_async(app_id, version_id, pattern_ids, custom_headers:custom_headers).value!
557
+ end
558
+
559
+ #
560
+ # Deletes a list of patterns in a version of the application.
561
+ #
562
+ # @param app_id The application ID.
563
+ # @param version_id [String] The version ID.
564
+ # @param pattern_ids The patterns IDs.
565
+ # @param [Hash{String => String}] A hash of custom headers that will be added
566
+ # to the HTTP request.
567
+ #
568
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
569
+ #
570
+ def delete_patterns_async(app_id, version_id, pattern_ids, custom_headers:nil)
571
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
572
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
573
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
574
+ fail ArgumentError, 'pattern_ids is nil' if pattern_ids.nil?
575
+
576
+
577
+ request_headers = {}
578
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
579
+
580
+ # Set Headers
581
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
582
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
583
+
584
+ # Serialize Request
585
+ request_mapper = {
586
+ client_side_validation: true,
587
+ required: true,
588
+ serialized_name: 'patternIds',
589
+ type: {
590
+ name: 'Sequence',
591
+ element: {
592
+ client_side_validation: true,
593
+ required: false,
594
+ serialized_name: 'UuidElementType',
595
+ type: {
596
+ name: 'String'
597
+ }
598
+ }
599
+ }
600
+ }
601
+ request_content = @client.serialize(request_mapper, pattern_ids)
602
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
603
+
604
+ path_template = 'apps/{appId}/versions/{versionId}/patternrules'
605
+
606
+ request_url = @base_url || @client.base_url
607
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
608
+
609
+ options = {
610
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
611
+ path_params: {'appId' => app_id,'versionId' => version_id},
612
+ body: request_content,
613
+ headers: request_headers.merge(custom_headers || {}),
614
+ base_url: request_url
615
+ }
616
+ promise = @client.make_request_async(:delete, path_template, options)
617
+
618
+ promise = promise.then do |result|
619
+ http_response = result.response
620
+ status_code = http_response.status
621
+ response_content = http_response.body
622
+ unless status_code == 200
623
+ error_model = JSON.load(response_content)
624
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
625
+ end
626
+
627
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
628
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
629
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
630
+ # Deserialize Response
631
+ if status_code == 200
632
+ begin
633
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
634
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::OperationStatus.mapper()
635
+ result.body = @client.deserialize(result_mapper, parsed_response)
636
+ rescue Exception => e
637
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
638
+ end
639
+ end
640
+
641
+ result
642
+ end
643
+
644
+ promise.execute
645
+ end
646
+
647
+ #
648
+ # Updates a pattern in a version of the application.
649
+ #
650
+ # @param app_id The application ID.
651
+ # @param version_id [String] The version ID.
652
+ # @param pattern_id The pattern ID.
653
+ # @param pattern [PatternRuleUpdateObject] An object representing a pattern.
654
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
655
+ # will be added to the HTTP request.
656
+ #
657
+ # @return [PatternRuleInfo] operation results.
658
+ #
659
+ def update_pattern(app_id, version_id, pattern_id, pattern, custom_headers:nil)
660
+ response = update_pattern_async(app_id, version_id, pattern_id, pattern, custom_headers:custom_headers).value!
661
+ response.body unless response.nil?
662
+ end
663
+
664
+ #
665
+ # Updates a pattern in a version of the application.
666
+ #
667
+ # @param app_id The application ID.
668
+ # @param version_id [String] The version ID.
669
+ # @param pattern_id The pattern ID.
670
+ # @param pattern [PatternRuleUpdateObject] An object representing a pattern.
671
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
672
+ # will be added to the HTTP request.
673
+ #
674
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
675
+ #
676
+ def update_pattern_with_http_info(app_id, version_id, pattern_id, pattern, custom_headers:nil)
677
+ update_pattern_async(app_id, version_id, pattern_id, pattern, custom_headers:custom_headers).value!
678
+ end
679
+
680
+ #
681
+ # Updates a pattern in a version of the application.
682
+ #
683
+ # @param app_id The application ID.
684
+ # @param version_id [String] The version ID.
685
+ # @param pattern_id The pattern ID.
686
+ # @param pattern [PatternRuleUpdateObject] An object representing a pattern.
687
+ # @param [Hash{String => String}] A hash of custom headers that will be added
688
+ # to the HTTP request.
689
+ #
690
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
691
+ #
692
+ def update_pattern_async(app_id, version_id, pattern_id, pattern, custom_headers:nil)
693
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
694
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
695
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
696
+ fail ArgumentError, 'pattern_id is nil' if pattern_id.nil?
697
+ fail ArgumentError, 'pattern is nil' if pattern.nil?
698
+
699
+
700
+ request_headers = {}
701
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
702
+
703
+ # Set Headers
704
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
705
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
706
+
707
+ # Serialize Request
708
+ request_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::PatternRuleUpdateObject.mapper()
709
+ request_content = @client.serialize(request_mapper, pattern)
710
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
711
+
712
+ path_template = 'apps/{appId}/versions/{versionId}/patternrules/{patternId}'
713
+
714
+ request_url = @base_url || @client.base_url
715
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
716
+
717
+ options = {
718
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
719
+ path_params: {'appId' => app_id,'versionId' => version_id,'patternId' => pattern_id},
720
+ body: request_content,
721
+ headers: request_headers.merge(custom_headers || {}),
722
+ base_url: request_url
723
+ }
724
+ promise = @client.make_request_async(:put, path_template, options)
725
+
726
+ promise = promise.then do |result|
727
+ http_response = result.response
728
+ status_code = http_response.status
729
+ response_content = http_response.body
730
+ unless status_code == 200
731
+ error_model = JSON.load(response_content)
732
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
733
+ end
734
+
735
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
736
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
737
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
738
+ # Deserialize Response
739
+ if status_code == 200
740
+ begin
741
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
742
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::PatternRuleInfo.mapper()
743
+ result.body = @client.deserialize(result_mapper, parsed_response)
744
+ rescue Exception => e
745
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
746
+ end
747
+ end
748
+
749
+ result
750
+ end
751
+
752
+ promise.execute
753
+ end
754
+
755
+ #
756
+ # Deletes the pattern with the specified ID from a version of the application..
757
+ #
758
+ # @param app_id The application ID.
759
+ # @param version_id [String] The version ID.
760
+ # @param pattern_id The pattern ID.
761
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
762
+ # will be added to the HTTP request.
763
+ #
764
+ # @return [OperationStatus] operation results.
765
+ #
766
+ def delete_pattern(app_id, version_id, pattern_id, custom_headers:nil)
767
+ response = delete_pattern_async(app_id, version_id, pattern_id, custom_headers:custom_headers).value!
768
+ response.body unless response.nil?
769
+ end
770
+
771
+ #
772
+ # Deletes the pattern with the specified ID from a version of the application..
773
+ #
774
+ # @param app_id The application ID.
775
+ # @param version_id [String] The version ID.
776
+ # @param pattern_id The pattern ID.
777
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
778
+ # will be added to the HTTP request.
779
+ #
780
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
781
+ #
782
+ def delete_pattern_with_http_info(app_id, version_id, pattern_id, custom_headers:nil)
783
+ delete_pattern_async(app_id, version_id, pattern_id, custom_headers:custom_headers).value!
784
+ end
785
+
786
+ #
787
+ # Deletes the pattern with the specified ID from a version of the application..
788
+ #
789
+ # @param app_id The application ID.
790
+ # @param version_id [String] The version ID.
791
+ # @param pattern_id The pattern ID.
792
+ # @param [Hash{String => String}] A hash of custom headers that will be added
793
+ # to the HTTP request.
794
+ #
795
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
796
+ #
797
+ def delete_pattern_async(app_id, version_id, pattern_id, custom_headers:nil)
798
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
799
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
800
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
801
+ fail ArgumentError, 'pattern_id is nil' if pattern_id.nil?
802
+
803
+
804
+ request_headers = {}
805
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
806
+
807
+ # Set Headers
808
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
809
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
810
+ path_template = 'apps/{appId}/versions/{versionId}/patternrules/{patternId}'
811
+
812
+ request_url = @base_url || @client.base_url
813
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
814
+
815
+ options = {
816
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
817
+ path_params: {'appId' => app_id,'versionId' => version_id,'patternId' => pattern_id},
818
+ headers: request_headers.merge(custom_headers || {}),
819
+ base_url: request_url
820
+ }
821
+ promise = @client.make_request_async(:delete, path_template, options)
822
+
823
+ promise = promise.then do |result|
824
+ http_response = result.response
825
+ status_code = http_response.status
826
+ response_content = http_response.body
827
+ unless status_code == 200
828
+ error_model = JSON.load(response_content)
829
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
830
+ end
831
+
832
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
833
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
834
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
835
+ # Deserialize Response
836
+ if status_code == 200
837
+ begin
838
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
839
+ result_mapper = Azure::CognitiveServices::LuisAuthoring::V3_0_preview::Models::OperationStatus.mapper()
840
+ result.body = @client.deserialize(result_mapper, parsed_response)
841
+ rescue Exception => e
842
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
843
+ end
844
+ end
845
+
846
+ result
847
+ end
848
+
849
+ promise.execute
850
+ end
851
+
852
+ #
853
+ # Returns patterns for the specific intent in a version of the application.
854
+ #
855
+ # @param app_id The application ID.
856
+ # @param version_id [String] The version ID.
857
+ # @param intent_id The intent classifier ID.
858
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
859
+ # @param take [Integer] The number of entries to return. Maximum page size is
860
+ # 500. Default is 100.
861
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
862
+ # will be added to the HTTP request.
863
+ #
864
+ # @return [Array] operation results.
865
+ #
866
+ def list_intent_patterns(app_id, version_id, intent_id, skip:0, take:100, custom_headers:nil)
867
+ response = list_intent_patterns_async(app_id, version_id, intent_id, skip:skip, take:take, custom_headers:custom_headers).value!
868
+ response.body unless response.nil?
869
+ end
870
+
871
+ #
872
+ # Returns patterns for the specific intent in a version of the application.
873
+ #
874
+ # @param app_id The application ID.
875
+ # @param version_id [String] The version ID.
876
+ # @param intent_id The intent classifier ID.
877
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
878
+ # @param take [Integer] The number of entries to return. Maximum page size is
879
+ # 500. Default is 100.
880
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
881
+ # will be added to the HTTP request.
882
+ #
883
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
884
+ #
885
+ def list_intent_patterns_with_http_info(app_id, version_id, intent_id, skip:0, take:100, custom_headers:nil)
886
+ list_intent_patterns_async(app_id, version_id, intent_id, skip:skip, take:take, custom_headers:custom_headers).value!
887
+ end
888
+
889
+ #
890
+ # Returns patterns for the specific intent in a version of the application.
891
+ #
892
+ # @param app_id The application ID.
893
+ # @param version_id [String] The version ID.
894
+ # @param intent_id The intent classifier ID.
895
+ # @param skip [Integer] The number of entries to skip. Default value is 0.
896
+ # @param take [Integer] The number of entries to return. Maximum page size is
897
+ # 500. Default is 100.
898
+ # @param [Hash{String => String}] A hash of custom headers that will be added
899
+ # to the HTTP request.
900
+ #
901
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
902
+ #
903
+ def list_intent_patterns_async(app_id, version_id, intent_id, skip:0, take:100, custom_headers:nil)
904
+ fail ArgumentError, '@client.endpoint is nil' if @client.endpoint.nil?
905
+ fail ArgumentError, 'app_id is nil' if app_id.nil?
906
+ fail ArgumentError, 'version_id is nil' if version_id.nil?
907
+ fail ArgumentError, 'intent_id is nil' if intent_id.nil?
908
+ fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0
909
+ fail ArgumentError, "'take' should satisfy the constraint - 'InclusiveMaximum': '500'" if !take.nil? && take > 500
910
+ fail ArgumentError, "'take' should satisfy the constraint - 'InclusiveMinimum': '0'" if !take.nil? && take < 0
911
+
912
+
913
+ request_headers = {}
914
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
915
+
916
+ # Set Headers
917
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
918
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
919
+ path_template = 'apps/{appId}/versions/{versionId}/intents/{intentId}/patternrules'
920
+
921
+ request_url = @base_url || @client.base_url
922
+ request_url = request_url.gsub('{Endpoint}', @client.endpoint)
923
+
924
+ options = {
925
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
926
+ path_params: {'appId' => app_id,'versionId' => version_id,'intentId' => intent_id},
927
+ query_params: {'skip' => skip,'take' => take},
928
+ headers: request_headers.merge(custom_headers || {}),
929
+ base_url: request_url
930
+ }
931
+ promise = @client.make_request_async(:get, path_template, options)
932
+
933
+ promise = promise.then do |result|
934
+ http_response = result.response
935
+ status_code = http_response.status
936
+ response_content = http_response.body
937
+ unless status_code == 200
938
+ error_model = JSON.load(response_content)
939
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
940
+ end
941
+
942
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
943
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
944
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
945
+ # Deserialize Response
946
+ if status_code == 200
947
+ begin
948
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
949
+ result_mapper = {
950
+ client_side_validation: true,
951
+ required: false,
952
+ serialized_name: 'parsed_response',
953
+ type: {
954
+ name: 'Sequence',
955
+ element: {
956
+ client_side_validation: true,
957
+ required: false,
958
+ serialized_name: 'PatternRuleInfoElementType',
959
+ type: {
960
+ name: 'Composite',
961
+ class_name: 'PatternRuleInfo'
962
+ }
963
+ }
964
+ }
965
+ }
966
+ result.body = @client.deserialize(result_mapper, parsed_response)
967
+ rescue Exception => e
968
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
969
+ end
970
+ end
971
+
972
+ result
973
+ end
974
+
975
+ promise.execute
976
+ end
977
+
978
+ end
979
+ end