azure_mgmt_iot_hub 0.17.0 → 0.17.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
  3. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +52 -0
  4. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +1 -1
  5. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +2 -2
  6. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +1 -1
  7. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +1 -1
  8. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +1 -1
  9. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +1 -1
  10. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/resource.rb +9 -0
  11. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +1 -1
  12. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +2 -2
  13. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
  14. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +52 -0
  15. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +1 -1
  16. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +2 -2
  17. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +1 -1
  18. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +1 -1
  19. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +1 -1
  20. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +1 -1
  21. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/resource.rb +9 -0
  22. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +1 -1
  23. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +2 -2
  24. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/certificates.rb +12 -0
  25. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
  26. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +52 -0
  27. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +1 -1
  28. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +1 -1
  29. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +1 -1
  30. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +1 -1
  31. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +1 -1
  32. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +1 -1
  33. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/resource.rb +9 -0
  34. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +1 -1
  35. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +1 -1
  36. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +2 -2
  37. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/operations.rb +4 -0
  38. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/certificates.rb +12 -0
  39. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
  40. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +54 -0
  41. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +1 -1
  42. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +1 -1
  43. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +1 -1
  44. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +1 -1
  45. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +1 -1
  46. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +1 -1
  47. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +1 -1
  48. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/resource.rb +9 -0
  49. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +1 -1
  50. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +1 -1
  51. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +2 -2
  52. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/operations.rb +4 -0
  53. data/lib/2018-04-01/generated/azure_mgmt_iot_hub.rb +33 -31
  54. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/certificates.rb +12 -0
  55. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
  56. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +62 -0
  57. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb +2 -2
  58. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb +1 -1
  59. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +1 -1
  60. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +1 -1
  61. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +1 -1
  62. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +1 -1
  63. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +1 -1
  64. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +1 -1
  65. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +1 -1
  66. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/resource.rb +9 -0
  67. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +1 -1
  68. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_twin.rb +58 -0
  69. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_twin_properties.rb +58 -0
  70. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +1 -1
  71. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +2 -2
  72. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb +12 -0
  73. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_input.rb +12 -0
  74. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/operations.rb +4 -0
  75. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/resource_provider_common.rb +2 -0
  76. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub.rb +109 -0
  77. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/certificates.rb +723 -0
  78. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/iot_hub_client.rb +143 -0
  79. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +3738 -0
  80. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/access_rights.rb +29 -0
  81. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/capabilities.rb +16 -0
  82. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb +47 -0
  83. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/certificate_description.rb +95 -0
  84. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb +56 -0
  85. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/certificate_properties.rb +118 -0
  86. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb +133 -0
  87. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb +47 -0
  88. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb +95 -0
  89. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +77 -0
  90. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb +69 -0
  91. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb +100 -0
  92. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_status.rb +18 -0
  93. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/error_details.rb +83 -0
  94. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +102 -0
  95. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +101 -0
  96. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +107 -0
  97. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +59 -0
  98. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +114 -0
  99. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +77 -0
  100. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +58 -0
  101. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +89 -0
  102. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +126 -0
  103. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +100 -0
  104. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +73 -0
  105. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +16 -0
  106. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +253 -0
  107. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties_device_streams.rb +54 -0
  108. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +71 -0
  109. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +101 -0
  110. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +17 -0
  111. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +21 -0
  112. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +71 -0
  113. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +101 -0
  114. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +73 -0
  115. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +17 -0
  116. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +16 -0
  117. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +71 -0
  118. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/job_response.rb +137 -0
  119. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +99 -0
  120. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/job_status.rb +20 -0
  121. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/job_type.rb +24 -0
  122. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/matched_route.rb +47 -0
  123. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +77 -0
  124. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/name.rb +57 -0
  125. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/operation.rb +60 -0
  126. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/operation_display.rb +83 -0
  127. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +46 -0
  128. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +103 -0
  129. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +73 -0
  130. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/resource.rb +113 -0
  131. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/route_compilation_error.rb +70 -0
  132. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/route_error_position.rb +57 -0
  133. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/route_error_range.rb +59 -0
  134. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/route_error_severity.rb +16 -0
  135. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/route_properties.rb +116 -0
  136. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +126 -0
  137. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +87 -0
  138. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_message.rb +84 -0
  139. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_properties.rb +88 -0
  140. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +90 -0
  141. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +90 -0
  142. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_source.rb +19 -0
  143. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +157 -0
  144. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_twin.rb +58 -0
  145. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/routing_twin_properties.rb +58 -0
  146. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +89 -0
  147. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +103 -0
  148. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +73 -0
  149. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/tags_resource.rb +55 -0
  150. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb +72 -0
  151. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_result.rb +55 -0
  152. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/test_result_status.rb +17 -0
  153. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/test_route_input.rb +71 -0
  154. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/test_route_result.rb +59 -0
  155. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/test_route_result_details.rb +56 -0
  156. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota.rb +102 -0
  157. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota_list_result.rb +67 -0
  158. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/module_definition.rb +9 -0
  159. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/operations.rb +219 -0
  160. data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/resource_provider_common.rb +117 -0
  161. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub.rb +112 -0
  162. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/certificates.rb +723 -0
  163. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/iot_hub.rb +172 -0
  164. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/iot_hub_client.rb +147 -0
  165. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +3738 -0
  166. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/access_rights.rb +29 -0
  167. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/capabilities.rb +16 -0
  168. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb +47 -0
  169. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_description.rb +95 -0
  170. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb +56 -0
  171. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_properties.rb +118 -0
  172. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb +133 -0
  173. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb +47 -0
  174. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb +95 -0
  175. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +77 -0
  176. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb +69 -0
  177. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb +100 -0
  178. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_status.rb +18 -0
  179. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/enrichment_properties.rb +81 -0
  180. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/error_details.rb +83 -0
  181. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +102 -0
  182. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +101 -0
  183. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +107 -0
  184. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +59 -0
  185. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/failover_input.rb +46 -0
  186. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +114 -0
  187. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +77 -0
  188. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +58 -0
  189. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +89 -0
  190. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +126 -0
  191. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +100 -0
  192. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +73 -0
  193. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +16 -0
  194. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +253 -0
  195. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties_device_streams.rb +54 -0
  196. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +71 -0
  197. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +101 -0
  198. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +17 -0
  199. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +21 -0
  200. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +71 -0
  201. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +101 -0
  202. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +73 -0
  203. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +17 -0
  204. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +16 -0
  205. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +71 -0
  206. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/job_response.rb +137 -0
  207. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +99 -0
  208. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/job_status.rb +20 -0
  209. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/job_type.rb +24 -0
  210. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/matched_route.rb +47 -0
  211. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +77 -0
  212. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/name.rb +57 -0
  213. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/operation.rb +60 -0
  214. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/operation_display.rb +83 -0
  215. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +46 -0
  216. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +103 -0
  217. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +73 -0
  218. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/resource.rb +113 -0
  219. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_compilation_error.rb +70 -0
  220. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_error_position.rb +57 -0
  221. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_error_range.rb +59 -0
  222. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_error_severity.rb +16 -0
  223. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_properties.rb +116 -0
  224. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +126 -0
  225. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +87 -0
  226. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_message.rb +84 -0
  227. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_properties.rb +110 -0
  228. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +90 -0
  229. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +90 -0
  230. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_source.rb +19 -0
  231. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +157 -0
  232. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_twin.rb +58 -0
  233. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_twin_properties.rb +58 -0
  234. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +89 -0
  235. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +103 -0
  236. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +73 -0
  237. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/tags_resource.rb +55 -0
  238. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb +72 -0
  239. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_result.rb +55 -0
  240. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_result_status.rb +17 -0
  241. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_route_input.rb +71 -0
  242. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_route_result.rb +59 -0
  243. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_route_result_details.rb +56 -0
  244. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota.rb +102 -0
  245. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota_list_result.rb +67 -0
  246. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/module_definition.rb +9 -0
  247. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/operations.rb +219 -0
  248. data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/resource_provider_common.rb +117 -0
  249. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub.rb +114 -0
  250. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/certificates.rb +723 -0
  251. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/iot_hub.rb +172 -0
  252. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/iot_hub_client.rb +147 -0
  253. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +3738 -0
  254. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/access_rights.rb +29 -0
  255. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/capabilities.rb +16 -0
  256. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb +47 -0
  257. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_description.rb +95 -0
  258. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb +56 -0
  259. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_properties.rb +118 -0
  260. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb +133 -0
  261. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb +47 -0
  262. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb +95 -0
  263. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +77 -0
  264. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb +69 -0
  265. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb +100 -0
  266. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_status.rb +18 -0
  267. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/enrichment_properties.rb +81 -0
  268. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/error_details.rb +83 -0
  269. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +102 -0
  270. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +101 -0
  271. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +107 -0
  272. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +59 -0
  273. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/failover_input.rb +46 -0
  274. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +114 -0
  275. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +77 -0
  276. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +58 -0
  277. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +89 -0
  278. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +126 -0
  279. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +100 -0
  280. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_location_description.rb +59 -0
  281. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +73 -0
  282. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +16 -0
  283. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +275 -0
  284. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties_device_streams.rb +54 -0
  285. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +71 -0
  286. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +101 -0
  287. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_replica_role_type.rb +16 -0
  288. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +17 -0
  289. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +21 -0
  290. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +71 -0
  291. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +101 -0
  292. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +73 -0
  293. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +17 -0
  294. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +16 -0
  295. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +71 -0
  296. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/job_response.rb +137 -0
  297. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +99 -0
  298. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/job_status.rb +20 -0
  299. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/job_type.rb +24 -0
  300. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/matched_route.rb +47 -0
  301. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +77 -0
  302. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/name.rb +57 -0
  303. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/operation.rb +60 -0
  304. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/operation_display.rb +83 -0
  305. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +46 -0
  306. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +103 -0
  307. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +73 -0
  308. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/resource.rb +113 -0
  309. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_compilation_error.rb +70 -0
  310. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_error_position.rb +57 -0
  311. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_error_range.rb +59 -0
  312. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_error_severity.rb +16 -0
  313. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_properties.rb +116 -0
  314. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +126 -0
  315. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +87 -0
  316. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_message.rb +84 -0
  317. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_properties.rb +110 -0
  318. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +90 -0
  319. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +90 -0
  320. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_source.rb +20 -0
  321. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +157 -0
  322. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_twin.rb +58 -0
  323. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_twin_properties.rb +58 -0
  324. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +89 -0
  325. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +103 -0
  326. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +73 -0
  327. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/tags_resource.rb +55 -0
  328. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb +73 -0
  329. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_result.rb +55 -0
  330. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_result_status.rb +17 -0
  331. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_route_input.rb +71 -0
  332. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_route_result.rb +59 -0
  333. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_route_result_details.rb +56 -0
  334. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota.rb +102 -0
  335. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota_list_result.rb +67 -0
  336. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/module_definition.rb +9 -0
  337. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/operations.rb +219 -0
  338. data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/resource_provider_common.rb +117 -0
  339. data/lib/azure_mgmt_iot_hub.rb +6 -3
  340. data/lib/profiles/latest/modules/iothub_profile_module.rb +209 -195
  341. data/lib/version.rb +1 -1
  342. metadata +270 -5
@@ -0,0 +1,112 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2019-03-22-preview/generated/azure_mgmt_iot_hub/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::IotHub::Mgmt::V2019_03_22_preview
23
+ autoload :Operations, '2019-03-22-preview/generated/azure_mgmt_iot_hub/operations.rb'
24
+ autoload :IotHubResource, '2019-03-22-preview/generated/azure_mgmt_iot_hub/iot_hub_resource.rb'
25
+ autoload :ResourceProviderCommon, '2019-03-22-preview/generated/azure_mgmt_iot_hub/resource_provider_common.rb'
26
+ autoload :Certificates, '2019-03-22-preview/generated/azure_mgmt_iot_hub/certificates.rb'
27
+ autoload :IotHub, '2019-03-22-preview/generated/azure_mgmt_iot_hub/iot_hub.rb'
28
+ autoload :IotHubClient, '2019-03-22-preview/generated/azure_mgmt_iot_hub/iot_hub_client.rb'
29
+
30
+ module Models
31
+ autoload :IotHubQuotaMetricInfo, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb'
32
+ autoload :IotHubQuotaMetricInfoListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb'
33
+ autoload :CertificateProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_properties.rb'
34
+ autoload :EndpointHealthData, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb'
35
+ autoload :CertificateListDescription, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb'
36
+ autoload :EndpointHealthDataListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb'
37
+ autoload :CertificatePropertiesWithNonce, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb'
38
+ autoload :RegistryStatistics, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/registry_statistics.rb'
39
+ autoload :SharedAccessSignatureAuthorizationRule, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb'
40
+ autoload :JobResponse, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/job_response.rb'
41
+ autoload :EventHubProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb'
42
+ autoload :JobResponseListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb'
43
+ autoload :RoutingServiceBusTopicEndpointProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb'
44
+ autoload :IotHubCapacity, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb'
45
+ autoload :RoutingStorageContainerProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb'
46
+ autoload :IotHubSkuDescription, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb'
47
+ autoload :RouteProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_properties.rb'
48
+ autoload :TagsResource, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/tags_resource.rb'
49
+ autoload :EnrichmentProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/enrichment_properties.rb'
50
+ autoload :EventHubConsumerGroupInfo, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb'
51
+ autoload :StorageEndpointProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb'
52
+ autoload :EventHubConsumerGroupsListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb'
53
+ autoload :FeedbackProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/feedback_properties.rb'
54
+ autoload :IotHubSkuDescriptionListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb'
55
+ autoload :IotHubPropertiesDeviceStreams, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties_device_streams.rb'
56
+ autoload :IotHubDescriptionListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb'
57
+ autoload :IotHubSkuInfo, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb'
58
+ autoload :OperationInputs, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/operation_inputs.rb'
59
+ autoload :Resource, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/resource.rb'
60
+ autoload :IotHubNameAvailabilityInfo, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb'
61
+ autoload :OperationDisplay, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/operation_display.rb'
62
+ autoload :Name, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/name.rb'
63
+ autoload :OperationListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/operation_list_result.rb'
64
+ autoload :UserSubscriptionQuota, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota.rb'
65
+ autoload :CertificateVerificationDescription, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb'
66
+ autoload :UserSubscriptionQuotaListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota_list_result.rb'
67
+ autoload :CertificateBodyDescription, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb'
68
+ autoload :RoutingMessage, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_message.rb'
69
+ autoload :IpFilterRule, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb'
70
+ autoload :RoutingTwinProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_twin_properties.rb'
71
+ autoload :RoutingEventHubProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb'
72
+ autoload :RoutingTwin, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_twin.rb'
73
+ autoload :FallbackRouteProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb'
74
+ autoload :TestAllRoutesInput, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb'
75
+ autoload :MessagingEndpointProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb'
76
+ autoload :MatchedRoute, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/matched_route.rb'
77
+ autoload :IotHubProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb'
78
+ autoload :TestAllRoutesResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_result.rb'
79
+ autoload :SharedAccessSignatureAuthorizationRuleListResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb'
80
+ autoload :TestRouteInput, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_route_input.rb'
81
+ autoload :ErrorDetails, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/error_details.rb'
82
+ autoload :RouteErrorPosition, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_error_position.rb'
83
+ autoload :CertificateWithNonceDescription, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb'
84
+ autoload :RouteErrorRange, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_error_range.rb'
85
+ autoload :RoutingEndpoints, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb'
86
+ autoload :RouteCompilationError, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_compilation_error.rb'
87
+ autoload :CloudToDeviceProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb'
88
+ autoload :TestRouteResultDetails, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_route_result_details.rb'
89
+ autoload :Operation, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/operation.rb'
90
+ autoload :TestRouteResult, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_route_result.rb'
91
+ autoload :RoutingServiceBusQueueEndpointProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb'
92
+ autoload :ExportDevicesRequest, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/export_devices_request.rb'
93
+ autoload :CertificateDescription, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/certificate_description.rb'
94
+ autoload :ImportDevicesRequest, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/import_devices_request.rb'
95
+ autoload :RoutingProperties, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_properties.rb'
96
+ autoload :FailoverInput, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/failover_input.rb'
97
+ autoload :IotHubDescription, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb'
98
+ autoload :AccessRights, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/access_rights.rb'
99
+ autoload :IpFilterActionType, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb'
100
+ autoload :RoutingSource, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/routing_source.rb'
101
+ autoload :Capabilities, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/capabilities.rb'
102
+ autoload :IotHubSku, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb'
103
+ autoload :IotHubSkuTier, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb'
104
+ autoload :EndpointHealthStatus, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_status.rb'
105
+ autoload :JobType, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/job_type.rb'
106
+ autoload :JobStatus, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/job_status.rb'
107
+ autoload :IotHubScaleType, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb'
108
+ autoload :IotHubNameUnavailabilityReason, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb'
109
+ autoload :TestResultStatus, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/test_result_status.rb'
110
+ autoload :RouteErrorSeverity, '2019-03-22-preview/generated/azure_mgmt_iot_hub/models/route_error_severity.rb'
111
+ end
112
+ end
@@ -0,0 +1,723 @@
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::IotHub::Mgmt::V2019_03_22_preview
7
+ #
8
+ # Use this API to manage the IoT hubs in your Azure subscription.
9
+ #
10
+ class Certificates
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Certificates class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [IotHubClient] reference to the IotHubClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get the certificate list.
26
+ #
27
+ # Returns the list of certificates.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group that
30
+ # contains the IoT hub.
31
+ # @param resource_name [String] The name of the IoT hub.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [CertificateListDescription] operation results.
36
+ #
37
+ def list_by_iot_hub(resource_group_name, resource_name, custom_headers:nil)
38
+ response = list_by_iot_hub_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Get the certificate list.
44
+ #
45
+ # Returns the list of certificates.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group that
48
+ # contains the IoT hub.
49
+ # @param resource_name [String] The name of the IoT hub.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_by_iot_hub_with_http_info(resource_group_name, resource_name, custom_headers:nil)
56
+ list_by_iot_hub_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Get the certificate list.
61
+ #
62
+ # Returns the list of certificates.
63
+ #
64
+ # @param resource_group_name [String] The name of the resource group that
65
+ # contains the IoT hub.
66
+ # @param resource_name [String] The name of the IoT hub.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_by_iot_hub_async(resource_group_name, resource_name, custom_headers:nil)
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
76
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
109
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::IotHub::Mgmt::V2019_03_22_preview::Models::CertificateListDescription.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Get the certificate.
129
+ #
130
+ # Returns the certificate.
131
+ #
132
+ # @param resource_group_name [String] The name of the resource group that
133
+ # contains the IoT hub.
134
+ # @param resource_name [String] The name of the IoT hub.
135
+ # @param certificate_name [String] The name of the certificate
136
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
137
+ # will be added to the HTTP request.
138
+ #
139
+ # @return [CertificateDescription] operation results.
140
+ #
141
+ def get(resource_group_name, resource_name, certificate_name, custom_headers:nil)
142
+ response = get_async(resource_group_name, resource_name, certificate_name, custom_headers:custom_headers).value!
143
+ response.body unless response.nil?
144
+ end
145
+
146
+ #
147
+ # Get the certificate.
148
+ #
149
+ # Returns the certificate.
150
+ #
151
+ # @param resource_group_name [String] The name of the resource group that
152
+ # contains the IoT hub.
153
+ # @param resource_name [String] The name of the IoT hub.
154
+ # @param certificate_name [String] The name of the certificate
155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
+ # will be added to the HTTP request.
157
+ #
158
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
159
+ #
160
+ def get_with_http_info(resource_group_name, resource_name, certificate_name, custom_headers:nil)
161
+ get_async(resource_group_name, resource_name, certificate_name, custom_headers:custom_headers).value!
162
+ end
163
+
164
+ #
165
+ # Get the certificate.
166
+ #
167
+ # Returns the certificate.
168
+ #
169
+ # @param resource_group_name [String] The name of the resource group that
170
+ # contains the IoT hub.
171
+ # @param resource_name [String] The name of the IoT hub.
172
+ # @param certificate_name [String] The name of the certificate
173
+ # @param [Hash{String => String}] A hash of custom headers that will be added
174
+ # to the HTTP request.
175
+ #
176
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
177
+ #
178
+ def get_async(resource_group_name, resource_name, certificate_name, custom_headers:nil)
179
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
180
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
181
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
182
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
183
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
184
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
185
+
186
+
187
+ request_headers = {}
188
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
189
+
190
+ # Set Headers
191
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
192
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
193
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'
194
+
195
+ request_url = @base_url || @client.base_url
196
+
197
+ options = {
198
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
199
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
200
+ query_params: {'api-version' => @client.api_version},
201
+ headers: request_headers.merge(custom_headers || {}),
202
+ base_url: request_url
203
+ }
204
+ promise = @client.make_request_async(:get, path_template, options)
205
+
206
+ promise = promise.then do |result|
207
+ http_response = result.response
208
+ status_code = http_response.status
209
+ response_content = http_response.body
210
+ unless status_code == 200
211
+ error_model = JSON.load(response_content)
212
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
213
+ end
214
+
215
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
216
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
217
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
218
+ # Deserialize Response
219
+ if status_code == 200
220
+ begin
221
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
222
+ result_mapper = Azure::IotHub::Mgmt::V2019_03_22_preview::Models::CertificateDescription.mapper()
223
+ result.body = @client.deserialize(result_mapper, parsed_response)
224
+ rescue Exception => e
225
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
226
+ end
227
+ end
228
+
229
+ result
230
+ end
231
+
232
+ promise.execute
233
+ end
234
+
235
+ #
236
+ # Upload the certificate to the IoT hub.
237
+ #
238
+ # Adds new or replaces existing certificate.
239
+ #
240
+ # @param resource_group_name [String] The name of the resource group that
241
+ # contains the IoT hub.
242
+ # @param resource_name [String] The name of the IoT hub.
243
+ # @param certificate_name [String] The name of the certificate
244
+ # @param certificate_description [CertificateBodyDescription] The certificate
245
+ # body.
246
+ # @param if_match [String] ETag of the Certificate. Do not specify for creating
247
+ # a brand new certificate. Required to update an existing certificate.
248
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
249
+ # will be added to the HTTP request.
250
+ #
251
+ # @return [CertificateDescription] operation results.
252
+ #
253
+ def create_or_update(resource_group_name, resource_name, certificate_name, certificate_description, if_match:nil, custom_headers:nil)
254
+ response = create_or_update_async(resource_group_name, resource_name, certificate_name, certificate_description, if_match:if_match, custom_headers:custom_headers).value!
255
+ response.body unless response.nil?
256
+ end
257
+
258
+ #
259
+ # Upload the certificate to the IoT hub.
260
+ #
261
+ # Adds new or replaces existing certificate.
262
+ #
263
+ # @param resource_group_name [String] The name of the resource group that
264
+ # contains the IoT hub.
265
+ # @param resource_name [String] The name of the IoT hub.
266
+ # @param certificate_name [String] The name of the certificate
267
+ # @param certificate_description [CertificateBodyDescription] The certificate
268
+ # body.
269
+ # @param if_match [String] ETag of the Certificate. Do not specify for creating
270
+ # a brand new certificate. Required to update an existing certificate.
271
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
272
+ # will be added to the HTTP request.
273
+ #
274
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
275
+ #
276
+ def create_or_update_with_http_info(resource_group_name, resource_name, certificate_name, certificate_description, if_match:nil, custom_headers:nil)
277
+ create_or_update_async(resource_group_name, resource_name, certificate_name, certificate_description, if_match:if_match, custom_headers:custom_headers).value!
278
+ end
279
+
280
+ #
281
+ # Upload the certificate to the IoT hub.
282
+ #
283
+ # Adds new or replaces existing certificate.
284
+ #
285
+ # @param resource_group_name [String] The name of the resource group that
286
+ # contains the IoT hub.
287
+ # @param resource_name [String] The name of the IoT hub.
288
+ # @param certificate_name [String] The name of the certificate
289
+ # @param certificate_description [CertificateBodyDescription] The certificate
290
+ # body.
291
+ # @param if_match [String] ETag of the Certificate. Do not specify for creating
292
+ # a brand new certificate. Required to update an existing certificate.
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 create_or_update_async(resource_group_name, resource_name, certificate_name, certificate_description, if_match:nil, custom_headers:nil)
299
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
300
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
301
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
302
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
303
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
304
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
305
+ fail ArgumentError, 'certificate_description is nil' if certificate_description.nil?
306
+
307
+
308
+ request_headers = {}
309
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
310
+
311
+ # Set Headers
312
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
313
+ request_headers['If-Match'] = if_match unless if_match.nil?
314
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
315
+
316
+ # Serialize Request
317
+ request_mapper = Azure::IotHub::Mgmt::V2019_03_22_preview::Models::CertificateBodyDescription.mapper()
318
+ request_content = @client.serialize(request_mapper, certificate_description)
319
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
320
+
321
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'
322
+
323
+ request_url = @base_url || @client.base_url
324
+
325
+ options = {
326
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
327
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
328
+ query_params: {'api-version' => @client.api_version},
329
+ body: request_content,
330
+ headers: request_headers.merge(custom_headers || {}),
331
+ base_url: request_url
332
+ }
333
+ promise = @client.make_request_async(:put, path_template, options)
334
+
335
+ promise = promise.then do |result|
336
+ http_response = result.response
337
+ status_code = http_response.status
338
+ response_content = http_response.body
339
+ unless status_code == 201 || status_code == 200
340
+ error_model = JSON.load(response_content)
341
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
342
+ end
343
+
344
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
345
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
346
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
347
+ # Deserialize Response
348
+ if status_code == 201
349
+ begin
350
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
351
+ result_mapper = Azure::IotHub::Mgmt::V2019_03_22_preview::Models::CertificateDescription.mapper()
352
+ result.body = @client.deserialize(result_mapper, parsed_response)
353
+ rescue Exception => e
354
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
355
+ end
356
+ end
357
+ # Deserialize Response
358
+ if status_code == 200
359
+ begin
360
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
361
+ result_mapper = Azure::IotHub::Mgmt::V2019_03_22_preview::Models::CertificateDescription.mapper()
362
+ result.body = @client.deserialize(result_mapper, parsed_response)
363
+ rescue Exception => e
364
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
365
+ end
366
+ end
367
+
368
+ result
369
+ end
370
+
371
+ promise.execute
372
+ end
373
+
374
+ #
375
+ # Delete an X509 certificate.
376
+ #
377
+ # Deletes an existing X509 certificate or does nothing if it does not exist.
378
+ #
379
+ # @param resource_group_name [String] The name of the resource group that
380
+ # contains the IoT hub.
381
+ # @param resource_name [String] The name of the IoT hub.
382
+ # @param certificate_name [String] The name of the certificate
383
+ # @param if_match [String] ETag of the Certificate.
384
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
385
+ # will be added to the HTTP request.
386
+ #
387
+ #
388
+ def delete(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
389
+ response = delete_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:custom_headers).value!
390
+ nil
391
+ end
392
+
393
+ #
394
+ # Delete an X509 certificate.
395
+ #
396
+ # Deletes an existing X509 certificate or does nothing if it does not exist.
397
+ #
398
+ # @param resource_group_name [String] The name of the resource group that
399
+ # contains the IoT hub.
400
+ # @param resource_name [String] The name of the IoT hub.
401
+ # @param certificate_name [String] The name of the certificate
402
+ # @param if_match [String] ETag of the Certificate.
403
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
404
+ # will be added to the HTTP request.
405
+ #
406
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
407
+ #
408
+ def delete_with_http_info(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
409
+ delete_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:custom_headers).value!
410
+ end
411
+
412
+ #
413
+ # Delete an X509 certificate.
414
+ #
415
+ # Deletes an existing X509 certificate or does nothing if it does not exist.
416
+ #
417
+ # @param resource_group_name [String] The name of the resource group that
418
+ # contains the IoT hub.
419
+ # @param resource_name [String] The name of the IoT hub.
420
+ # @param certificate_name [String] The name of the certificate
421
+ # @param if_match [String] ETag of the Certificate.
422
+ # @param [Hash{String => String}] A hash of custom headers that will be added
423
+ # to the HTTP request.
424
+ #
425
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
426
+ #
427
+ def delete_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
428
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
429
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
430
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
431
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
432
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
433
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
434
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
435
+
436
+
437
+ request_headers = {}
438
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
439
+
440
+ # Set Headers
441
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
442
+ request_headers['If-Match'] = if_match unless if_match.nil?
443
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
444
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}'
445
+
446
+ request_url = @base_url || @client.base_url
447
+
448
+ options = {
449
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
450
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
451
+ query_params: {'api-version' => @client.api_version},
452
+ headers: request_headers.merge(custom_headers || {}),
453
+ base_url: request_url
454
+ }
455
+ promise = @client.make_request_async(:delete, path_template, options)
456
+
457
+ promise = promise.then do |result|
458
+ http_response = result.response
459
+ status_code = http_response.status
460
+ response_content = http_response.body
461
+ unless status_code == 200 || status_code == 204
462
+ error_model = JSON.load(response_content)
463
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
464
+ end
465
+
466
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
467
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
468
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
469
+
470
+ result
471
+ end
472
+
473
+ promise.execute
474
+ end
475
+
476
+ #
477
+ # Generate verification code for proof of possession flow.
478
+ #
479
+ # Generates verification code for proof of possession flow. The verification
480
+ # code will be used to generate a leaf certificate.
481
+ #
482
+ # @param resource_group_name [String] The name of the resource group that
483
+ # contains the IoT hub.
484
+ # @param resource_name [String] The name of the IoT hub.
485
+ # @param certificate_name [String] The name of the certificate
486
+ # @param if_match [String] ETag of the Certificate.
487
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
488
+ # will be added to the HTTP request.
489
+ #
490
+ # @return [CertificateWithNonceDescription] operation results.
491
+ #
492
+ def generate_verification_code(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
493
+ response = generate_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:custom_headers).value!
494
+ response.body unless response.nil?
495
+ end
496
+
497
+ #
498
+ # Generate verification code for proof of possession flow.
499
+ #
500
+ # Generates verification code for proof of possession flow. The verification
501
+ # code will be used to generate a leaf certificate.
502
+ #
503
+ # @param resource_group_name [String] The name of the resource group that
504
+ # contains the IoT hub.
505
+ # @param resource_name [String] The name of the IoT hub.
506
+ # @param certificate_name [String] The name of the certificate
507
+ # @param if_match [String] ETag of the Certificate.
508
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
509
+ # will be added to the HTTP request.
510
+ #
511
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
512
+ #
513
+ def generate_verification_code_with_http_info(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
514
+ generate_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:custom_headers).value!
515
+ end
516
+
517
+ #
518
+ # Generate verification code for proof of possession flow.
519
+ #
520
+ # Generates verification code for proof of possession flow. The verification
521
+ # code will be used to generate a leaf certificate.
522
+ #
523
+ # @param resource_group_name [String] The name of the resource group that
524
+ # contains the IoT hub.
525
+ # @param resource_name [String] The name of the IoT hub.
526
+ # @param certificate_name [String] The name of the certificate
527
+ # @param if_match [String] ETag of the Certificate.
528
+ # @param [Hash{String => String}] A hash of custom headers that will be added
529
+ # to the HTTP request.
530
+ #
531
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
532
+ #
533
+ def generate_verification_code_async(resource_group_name, resource_name, certificate_name, if_match, custom_headers:nil)
534
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
535
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
536
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
537
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
538
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
539
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
540
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
541
+
542
+
543
+ request_headers = {}
544
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
545
+
546
+ # Set Headers
547
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
548
+ request_headers['If-Match'] = if_match unless if_match.nil?
549
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
550
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode'
551
+
552
+ request_url = @base_url || @client.base_url
553
+
554
+ options = {
555
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
556
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
557
+ query_params: {'api-version' => @client.api_version},
558
+ headers: request_headers.merge(custom_headers || {}),
559
+ base_url: request_url
560
+ }
561
+ promise = @client.make_request_async(:post, path_template, options)
562
+
563
+ promise = promise.then do |result|
564
+ http_response = result.response
565
+ status_code = http_response.status
566
+ response_content = http_response.body
567
+ unless status_code == 200
568
+ error_model = JSON.load(response_content)
569
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
570
+ end
571
+
572
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
573
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
574
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
575
+ # Deserialize Response
576
+ if status_code == 200
577
+ begin
578
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
579
+ result_mapper = Azure::IotHub::Mgmt::V2019_03_22_preview::Models::CertificateWithNonceDescription.mapper()
580
+ result.body = @client.deserialize(result_mapper, parsed_response)
581
+ rescue Exception => e
582
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
583
+ end
584
+ end
585
+
586
+ result
587
+ end
588
+
589
+ promise.execute
590
+ end
591
+
592
+ #
593
+ # Verify certificate's private key possession.
594
+ #
595
+ # Verifies the certificate's private key possession by providing the leaf cert
596
+ # issued by the verifying pre uploaded certificate.
597
+ #
598
+ # @param resource_group_name [String] The name of the resource group that
599
+ # contains the IoT hub.
600
+ # @param resource_name [String] The name of the IoT hub.
601
+ # @param certificate_name [String] The name of the certificate
602
+ # @param certificate_verification_body [CertificateVerificationDescription] The
603
+ # name of the certificate
604
+ # @param if_match [String] ETag of the Certificate.
605
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
606
+ # will be added to the HTTP request.
607
+ #
608
+ # @return [CertificateDescription] operation results.
609
+ #
610
+ def verify(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:nil)
611
+ response = verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:custom_headers).value!
612
+ response.body unless response.nil?
613
+ end
614
+
615
+ #
616
+ # Verify certificate's private key possession.
617
+ #
618
+ # Verifies the certificate's private key possession by providing the leaf cert
619
+ # issued by the verifying pre uploaded certificate.
620
+ #
621
+ # @param resource_group_name [String] The name of the resource group that
622
+ # contains the IoT hub.
623
+ # @param resource_name [String] The name of the IoT hub.
624
+ # @param certificate_name [String] The name of the certificate
625
+ # @param certificate_verification_body [CertificateVerificationDescription] The
626
+ # name of the certificate
627
+ # @param if_match [String] ETag of the Certificate.
628
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
629
+ # will be added to the HTTP request.
630
+ #
631
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
632
+ #
633
+ def verify_with_http_info(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:nil)
634
+ verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:custom_headers).value!
635
+ end
636
+
637
+ #
638
+ # Verify certificate's private key possession.
639
+ #
640
+ # Verifies the certificate's private key possession by providing the leaf cert
641
+ # issued by the verifying pre uploaded certificate.
642
+ #
643
+ # @param resource_group_name [String] The name of the resource group that
644
+ # contains the IoT hub.
645
+ # @param resource_name [String] The name of the IoT hub.
646
+ # @param certificate_name [String] The name of the certificate
647
+ # @param certificate_verification_body [CertificateVerificationDescription] The
648
+ # name of the certificate
649
+ # @param if_match [String] ETag of the Certificate.
650
+ # @param [Hash{String => String}] A hash of custom headers that will be added
651
+ # to the HTTP request.
652
+ #
653
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
654
+ #
655
+ def verify_async(resource_group_name, resource_name, certificate_name, certificate_verification_body, if_match, custom_headers:nil)
656
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
657
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
658
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
659
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
660
+ fail ArgumentError, 'certificate_name is nil' if certificate_name.nil?
661
+ fail ArgumentError, "'certificate_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9-._]{1,64}$'" if !certificate_name.nil? && certificate_name.match(Regexp.new('^^[A-Za-z0-9-._]{1,64}$$')).nil?
662
+ fail ArgumentError, 'certificate_verification_body is nil' if certificate_verification_body.nil?
663
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
664
+
665
+
666
+ request_headers = {}
667
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
668
+
669
+ # Set Headers
670
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
671
+ request_headers['If-Match'] = if_match unless if_match.nil?
672
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
673
+
674
+ # Serialize Request
675
+ request_mapper = Azure::IotHub::Mgmt::V2019_03_22_preview::Models::CertificateVerificationDescription.mapper()
676
+ request_content = @client.serialize(request_mapper, certificate_verification_body)
677
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
678
+
679
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify'
680
+
681
+ request_url = @base_url || @client.base_url
682
+
683
+ options = {
684
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
685
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'certificateName' => certificate_name},
686
+ query_params: {'api-version' => @client.api_version},
687
+ body: request_content,
688
+ headers: request_headers.merge(custom_headers || {}),
689
+ base_url: request_url
690
+ }
691
+ promise = @client.make_request_async(:post, path_template, options)
692
+
693
+ promise = promise.then do |result|
694
+ http_response = result.response
695
+ status_code = http_response.status
696
+ response_content = http_response.body
697
+ unless status_code == 200
698
+ error_model = JSON.load(response_content)
699
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
700
+ end
701
+
702
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
703
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
704
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
705
+ # Deserialize Response
706
+ if status_code == 200
707
+ begin
708
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
709
+ result_mapper = Azure::IotHub::Mgmt::V2019_03_22_preview::Models::CertificateDescription.mapper()
710
+ result.body = @client.deserialize(result_mapper, parsed_response)
711
+ rescue Exception => e
712
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
713
+ end
714
+ end
715
+
716
+ result
717
+ end
718
+
719
+ promise.execute
720
+ end
721
+
722
+ end
723
+ end