azure_mgmt_iot_hub 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-02-03/generated/azure_mgmt_iot_hub/iot_hub_client.rb +7 -6
  3. data/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_client.rb +7 -6
  4. data/lib/2017-07-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb +7 -6
  5. data/lib/2018-01-22/generated/azure_mgmt_iot_hub.rb +89 -0
  6. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/certificates.rb +711 -0
  7. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_client.rb +139 -0
  8. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +3242 -0
  9. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/access_rights.rb +29 -0
  10. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/capabilities.rb +16 -0
  11. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb +47 -0
  12. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_description.rb +95 -0
  13. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb +56 -0
  14. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_properties.rb +107 -0
  15. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb +121 -0
  16. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb +47 -0
  17. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb +95 -0
  18. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +77 -0
  19. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/error_details.rb +83 -0
  20. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +102 -0
  21. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +101 -0
  22. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +107 -0
  23. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +59 -0
  24. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +114 -0
  25. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +77 -0
  26. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +58 -0
  27. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +89 -0
  28. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +126 -0
  29. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +100 -0
  30. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +73 -0
  31. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +16 -0
  32. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +252 -0
  33. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +71 -0
  34. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +101 -0
  35. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +17 -0
  36. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +18 -0
  37. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +71 -0
  38. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +101 -0
  39. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +73 -0
  40. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +16 -0
  41. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +16 -0
  42. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +71 -0
  43. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_response.rb +137 -0
  44. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +99 -0
  45. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_status.rb +20 -0
  46. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/job_type.rb +24 -0
  47. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +77 -0
  48. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation.rb +60 -0
  49. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_display.rb +71 -0
  50. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +46 -0
  51. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +103 -0
  52. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb +18 -0
  53. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb +58 -0
  54. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +73 -0
  55. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/resource.rb +104 -0
  56. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/route_properties.rb +116 -0
  57. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +126 -0
  58. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +87 -0
  59. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_properties.rb +88 -0
  60. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +90 -0
  61. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +90 -0
  62. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_source.rb +18 -0
  63. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +156 -0
  64. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +89 -0
  65. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +103 -0
  66. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +73 -0
  67. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/models/tags_resource.rb +55 -0
  68. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/module_definition.rb +9 -0
  69. data/lib/2018-01-22/generated/azure_mgmt_iot_hub/operations.rb +215 -0
  70. data/lib/2018-04-01/generated/azure_mgmt_iot_hub.rb +108 -0
  71. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/certificates.rb +711 -0
  72. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb +143 -0
  73. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +3676 -0
  74. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/access_rights.rb +29 -0
  75. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/capabilities.rb +16 -0
  76. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb +47 -0
  77. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_description.rb +95 -0
  78. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb +56 -0
  79. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_properties.rb +118 -0
  80. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb +133 -0
  81. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb +47 -0
  82. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb +95 -0
  83. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +77 -0
  84. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb +58 -0
  85. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb +100 -0
  86. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_status.rb +18 -0
  87. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/error_details.rb +83 -0
  88. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +102 -0
  89. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +101 -0
  90. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +107 -0
  91. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +59 -0
  92. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +114 -0
  93. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +77 -0
  94. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +58 -0
  95. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +89 -0
  96. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +126 -0
  97. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +100 -0
  98. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +73 -0
  99. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +16 -0
  100. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +252 -0
  101. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +71 -0
  102. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +101 -0
  103. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +17 -0
  104. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +21 -0
  105. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +71 -0
  106. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +101 -0
  107. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +73 -0
  108. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +17 -0
  109. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +16 -0
  110. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +71 -0
  111. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_response.rb +137 -0
  112. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +99 -0
  113. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_status.rb +20 -0
  114. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/job_type.rb +24 -0
  115. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/matched_route.rb +47 -0
  116. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +77 -0
  117. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/name.rb +57 -0
  118. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation.rb +60 -0
  119. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_display.rb +71 -0
  120. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +46 -0
  121. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +103 -0
  122. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb +18 -0
  123. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb +58 -0
  124. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +73 -0
  125. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/resource.rb +104 -0
  126. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_compilation_error.rb +70 -0
  127. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_position.rb +57 -0
  128. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_range.rb +59 -0
  129. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_severity.rb +16 -0
  130. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/route_properties.rb +116 -0
  131. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +126 -0
  132. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +87 -0
  133. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_message.rb +84 -0
  134. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_properties.rb +88 -0
  135. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +90 -0
  136. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +90 -0
  137. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_source.rb +19 -0
  138. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +156 -0
  139. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +89 -0
  140. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +103 -0
  141. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +73 -0
  142. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/tags_resource.rb +55 -0
  143. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb +60 -0
  144. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_all_routes_result.rb +55 -0
  145. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_result_status.rb +17 -0
  146. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_input.rb +59 -0
  147. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_result.rb +59 -0
  148. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_result_details.rb +56 -0
  149. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/user_subscription_quota.rb +102 -0
  150. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/models/user_subscription_quota_list_result.rb +67 -0
  151. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/module_definition.rb +9 -0
  152. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/operations.rb +215 -0
  153. data/lib/2018-04-01/generated/azure_mgmt_iot_hub/resource_provider_common.rb +115 -0
  154. data/lib/azure_mgmt_iot_hub.rb +3 -1
  155. data/lib/profiles/latest/modules/iothub_profile_module.rb +240 -162
  156. data/lib/version.rb +1 -1
  157. metadata +154 -5
@@ -0,0 +1,73 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::IotHub::Mgmt::V2018_01_22
7
+ module Models
8
+ #
9
+ # The properties of the Azure Storage endpoint for file upload.
10
+ #
11
+ class StorageEndpointProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Duration] The period of time for which the the SAS URI
16
+ # generated by IoT Hub for file upload is valid. See:
17
+ # https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
18
+ attr_accessor :sas_ttl_as_iso8601
19
+
20
+ # @return [String] The connection string for the Azure Storage account to
21
+ # which files are uploaded.
22
+ attr_accessor :connection_string
23
+
24
+ # @return [String] The name of the root container where you upload files.
25
+ # The container need not exist but should be creatable using the
26
+ # connectionString specified.
27
+ attr_accessor :container_name
28
+
29
+
30
+ #
31
+ # Mapper for StorageEndpointProperties class as Ruby Hash.
32
+ # This will be used for serialization/deserialization.
33
+ #
34
+ def self.mapper()
35
+ {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'StorageEndpointProperties',
39
+ type: {
40
+ name: 'Composite',
41
+ class_name: 'StorageEndpointProperties',
42
+ model_properties: {
43
+ sas_ttl_as_iso8601: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'sasTtlAsIso8601',
47
+ type: {
48
+ name: 'TimeSpan'
49
+ }
50
+ },
51
+ connection_string: {
52
+ client_side_validation: true,
53
+ required: true,
54
+ serialized_name: 'connectionString',
55
+ type: {
56
+ name: 'String'
57
+ }
58
+ },
59
+ container_name: {
60
+ client_side_validation: true,
61
+ required: true,
62
+ serialized_name: 'containerName',
63
+ type: {
64
+ name: 'String'
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,55 @@
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::V2018_01_22
7
+ module Models
8
+ #
9
+ # A container holding only the Tags for a resource, allowing the user to
10
+ # update the tags on an IoT Hub instance.
11
+ #
12
+ class TagsResource
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Hash{String => String}] Resource tags
17
+ attr_accessor :tags
18
+
19
+
20
+ #
21
+ # Mapper for TagsResource class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'TagsResource',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'TagsResource',
32
+ model_properties: {
33
+ tags: {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'tags',
37
+ type: {
38
+ name: 'Dictionary',
39
+ value: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'StringElementType',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ end
53
+ end
54
+ end
55
+ 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::IotHub end
8
+ module Azure::IotHub::Mgmt end
9
+ module Azure::IotHub::Mgmt::V2018_01_22 end
@@ -0,0 +1,215 @@
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::V2018_01_22
7
+ #
8
+ # Use this API to manage the IoT hubs in your Azure subscription.
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [IotHubClient] reference to the IotHubClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the available IoT Hub REST API operations.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [Array<Operation>] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ first_page = list_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Lists all of the available IoT Hub REST API operations.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Lists all of the available IoT Hub REST API operations.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'providers/Microsoft.Devices/operations'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ query_params: {'api-version' => @client.api_version},
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
88
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ # Deserialize Response
90
+ if status_code == 200
91
+ begin
92
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
93
+ result_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::OperationListResult.mapper()
94
+ result.body = @client.deserialize(result_mapper, parsed_response)
95
+ rescue Exception => e
96
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
97
+ end
98
+ end
99
+
100
+ result
101
+ end
102
+
103
+ promise.execute
104
+ end
105
+
106
+ #
107
+ # Lists all of the available IoT Hub REST API operations.
108
+ #
109
+ # @param next_page_link [String] The NextLink from the previous successful call
110
+ # to List operation.
111
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
112
+ # will be added to the HTTP request.
113
+ #
114
+ # @return [OperationListResult] operation results.
115
+ #
116
+ def list_next(next_page_link, custom_headers:nil)
117
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
118
+ response.body unless response.nil?
119
+ end
120
+
121
+ #
122
+ # Lists all of the available IoT Hub REST API operations.
123
+ #
124
+ # @param next_page_link [String] The NextLink from the previous successful call
125
+ # to List operation.
126
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
+ # will be added to the HTTP request.
128
+ #
129
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
130
+ #
131
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
132
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
133
+ end
134
+
135
+ #
136
+ # Lists all of the available IoT Hub REST API operations.
137
+ #
138
+ # @param next_page_link [String] The NextLink from the previous successful call
139
+ # to List operation.
140
+ # @param [Hash{String => String}] A hash of custom headers that will be added
141
+ # to the HTTP request.
142
+ #
143
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
144
+ #
145
+ def list_next_async(next_page_link, custom_headers:nil)
146
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
147
+
148
+
149
+ request_headers = {}
150
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
151
+
152
+ # Set Headers
153
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
154
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
155
+ path_template = '{nextLink}'
156
+
157
+ request_url = @base_url || @client.base_url
158
+
159
+ options = {
160
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
161
+ skip_encoding_path_params: {'nextLink' => next_page_link},
162
+ headers: request_headers.merge(custom_headers || {}),
163
+ base_url: request_url
164
+ }
165
+ promise = @client.make_request_async(:get, path_template, options)
166
+
167
+ promise = promise.then do |result|
168
+ http_response = result.response
169
+ status_code = http_response.status
170
+ response_content = http_response.body
171
+ unless status_code == 200
172
+ error_model = JSON.load(response_content)
173
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
174
+ end
175
+
176
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
177
+ # Deserialize Response
178
+ if status_code == 200
179
+ begin
180
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
181
+ result_mapper = Azure::IotHub::Mgmt::V2018_01_22::Models::OperationListResult.mapper()
182
+ result.body = @client.deserialize(result_mapper, parsed_response)
183
+ rescue Exception => e
184
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
185
+ end
186
+ end
187
+
188
+ result
189
+ end
190
+
191
+ promise.execute
192
+ end
193
+
194
+ #
195
+ # Lists all of the available IoT Hub REST API operations.
196
+ #
197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
198
+ # will be added to the HTTP request.
199
+ #
200
+ # @return [OperationListResult] which provide lazy access to pages of the
201
+ # response.
202
+ #
203
+ def list_as_lazy(custom_headers:nil)
204
+ response = list_async(custom_headers:custom_headers).value!
205
+ unless response.nil?
206
+ page = response.body
207
+ page.next_method = Proc.new do |next_page_link|
208
+ list_next_async(next_page_link, custom_headers:custom_headers)
209
+ end
210
+ page
211
+ end
212
+ end
213
+
214
+ end
215
+ end
@@ -0,0 +1,108 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ 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 '2018-04-01/generated/azure_mgmt_iot_hub/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::IotHub::Mgmt::V2018_04_01
23
+ autoload :Operations, '2018-04-01/generated/azure_mgmt_iot_hub/operations.rb'
24
+ autoload :IotHubResource, '2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_resource.rb'
25
+ autoload :ResourceProviderCommon, '2018-04-01/generated/azure_mgmt_iot_hub/resource_provider_common.rb'
26
+ autoload :Certificates, '2018-04-01/generated/azure_mgmt_iot_hub/certificates.rb'
27
+ autoload :IotHubClient, '2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb'
28
+
29
+ module Models
30
+ autoload :ErrorDetails, '2018-04-01/generated/azure_mgmt_iot_hub/models/error_details.rb'
31
+ autoload :IotHubQuotaMetricInfo, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb'
32
+ autoload :CertificateProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_properties.rb'
33
+ autoload :IotHubQuotaMetricInfoListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb'
34
+ autoload :CertificateListDescription, '2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb'
35
+ autoload :EndpointHealthData, '2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb'
36
+ autoload :CertificatePropertiesWithNonce, '2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb'
37
+ autoload :EndpointHealthDataListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb'
38
+ autoload :SharedAccessSignatureAuthorizationRule, '2018-04-01/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb'
39
+ autoload :RegistryStatistics, '2018-04-01/generated/azure_mgmt_iot_hub/models/registry_statistics.rb'
40
+ autoload :EventHubProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb'
41
+ autoload :JobResponse, '2018-04-01/generated/azure_mgmt_iot_hub/models/job_response.rb'
42
+ autoload :RoutingServiceBusTopicEndpointProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb'
43
+ autoload :JobResponseListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb'
44
+ autoload :RoutingStorageContainerProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb'
45
+ autoload :IotHubCapacity, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb'
46
+ autoload :RouteProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/route_properties.rb'
47
+ autoload :IotHubSkuDescription, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb'
48
+ autoload :RoutingProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/routing_properties.rb'
49
+ autoload :TagsResource, '2018-04-01/generated/azure_mgmt_iot_hub/models/tags_resource.rb'
50
+ autoload :MessagingEndpointProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb'
51
+ autoload :EventHubConsumerGroupInfo, '2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb'
52
+ autoload :CloudToDeviceProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb'
53
+ autoload :EventHubConsumerGroupsListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb'
54
+ autoload :IotHubProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb'
55
+ autoload :IotHubSkuDescriptionListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb'
56
+ autoload :Resource, '2018-04-01/generated/azure_mgmt_iot_hub/models/resource.rb'
57
+ autoload :IotHubDescriptionListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb'
58
+ autoload :OperationDisplay, '2018-04-01/generated/azure_mgmt_iot_hub/models/operation_display.rb'
59
+ autoload :OperationInputs, '2018-04-01/generated/azure_mgmt_iot_hub/models/operation_inputs.rb'
60
+ autoload :OperationListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/operation_list_result.rb'
61
+ autoload :IotHubNameAvailabilityInfo, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb'
62
+ autoload :CertificateDescription, '2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_description.rb'
63
+ autoload :Name, '2018-04-01/generated/azure_mgmt_iot_hub/models/name.rb'
64
+ autoload :CertificateWithNonceDescription, '2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb'
65
+ autoload :UserSubscriptionQuota, '2018-04-01/generated/azure_mgmt_iot_hub/models/user_subscription_quota.rb'
66
+ autoload :RoutingServiceBusQueueEndpointProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb'
67
+ autoload :UserSubscriptionQuotaListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/user_subscription_quota_list_result.rb'
68
+ autoload :RoutingEndpoints, '2018-04-01/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb'
69
+ autoload :RoutingMessage, '2018-04-01/generated/azure_mgmt_iot_hub/models/routing_message.rb'
70
+ autoload :StorageEndpointProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb'
71
+ autoload :TestAllRoutesInput, '2018-04-01/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb'
72
+ autoload :OperationsMonitoringProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb'
73
+ autoload :MatchedRoute, '2018-04-01/generated/azure_mgmt_iot_hub/models/matched_route.rb'
74
+ autoload :SharedAccessSignatureAuthorizationRuleListResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb'
75
+ autoload :TestAllRoutesResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/test_all_routes_result.rb'
76
+ autoload :CertificateVerificationDescription, '2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb'
77
+ autoload :TestRouteInput, '2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_input.rb'
78
+ autoload :IpFilterRule, '2018-04-01/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb'
79
+ autoload :RouteErrorPosition, '2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_position.rb'
80
+ autoload :FallbackRouteProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb'
81
+ autoload :RouteErrorRange, '2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_range.rb'
82
+ autoload :IotHubSkuInfo, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb'
83
+ autoload :RouteCompilationError, '2018-04-01/generated/azure_mgmt_iot_hub/models/route_compilation_error.rb'
84
+ autoload :CertificateBodyDescription, '2018-04-01/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb'
85
+ autoload :TestRouteResultDetails, '2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_result_details.rb'
86
+ autoload :FeedbackProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/feedback_properties.rb'
87
+ autoload :TestRouteResult, '2018-04-01/generated/azure_mgmt_iot_hub/models/test_route_result.rb'
88
+ autoload :RoutingEventHubProperties, '2018-04-01/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb'
89
+ autoload :ExportDevicesRequest, '2018-04-01/generated/azure_mgmt_iot_hub/models/export_devices_request.rb'
90
+ autoload :Operation, '2018-04-01/generated/azure_mgmt_iot_hub/models/operation.rb'
91
+ autoload :ImportDevicesRequest, '2018-04-01/generated/azure_mgmt_iot_hub/models/import_devices_request.rb'
92
+ autoload :IotHubDescription, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb'
93
+ autoload :AccessRights, '2018-04-01/generated/azure_mgmt_iot_hub/models/access_rights.rb'
94
+ autoload :IpFilterActionType, '2018-04-01/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb'
95
+ autoload :RoutingSource, '2018-04-01/generated/azure_mgmt_iot_hub/models/routing_source.rb'
96
+ autoload :OperationMonitoringLevel, '2018-04-01/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb'
97
+ autoload :Capabilities, '2018-04-01/generated/azure_mgmt_iot_hub/models/capabilities.rb'
98
+ autoload :IotHubSku, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb'
99
+ autoload :IotHubSkuTier, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb'
100
+ autoload :EndpointHealthStatus, '2018-04-01/generated/azure_mgmt_iot_hub/models/endpoint_health_status.rb'
101
+ autoload :JobType, '2018-04-01/generated/azure_mgmt_iot_hub/models/job_type.rb'
102
+ autoload :JobStatus, '2018-04-01/generated/azure_mgmt_iot_hub/models/job_status.rb'
103
+ autoload :IotHubScaleType, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb'
104
+ autoload :IotHubNameUnavailabilityReason, '2018-04-01/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb'
105
+ autoload :TestResultStatus, '2018-04-01/generated/azure_mgmt_iot_hub/models/test_result_status.rb'
106
+ autoload :RouteErrorSeverity, '2018-04-01/generated/azure_mgmt_iot_hub/models/route_error_severity.rb'
107
+ end
108
+ end