azure_mgmt_databoxedge 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2019-08-01/generated/azure_mgmt_databoxedge.rb +158 -0
  4. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/alerts.rb +328 -0
  5. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/bandwidth_schedules.rb +621 -0
  6. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/containers.rb +771 -0
  7. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/data_box_edge_management_client.rb +191 -0
  8. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/devices.rb +1811 -0
  9. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/jobs.rb +126 -0
  10. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/account_type.rb +16 -0
  11. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/address.rb +112 -0
  12. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/alert.rb +156 -0
  13. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/alert_error_details.rb +71 -0
  14. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/alert_list.rb +100 -0
  15. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/alert_severity.rb +17 -0
  16. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/armbase_model.rb +71 -0
  17. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/asymmetric_encrypted_secret.rb +70 -0
  18. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/authentication.rb +47 -0
  19. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/authentication_type.rb +16 -0
  20. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/azure_container_data_format.rb +17 -0
  21. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/azure_container_info.rb +72 -0
  22. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/bandwidth_schedule.rb +115 -0
  23. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/bandwidth_schedules_list.rb +100 -0
  24. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/client_access_right.rb +59 -0
  25. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/client_permission_type.rb +17 -0
  26. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/contact_details.rb +87 -0
  27. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/container.rb +113 -0
  28. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/container_list.rb +100 -0
  29. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/container_status.rb +19 -0
  30. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device.rb +300 -0
  31. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device_extended_info.rb +97 -0
  32. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device_list.rb +101 -0
  33. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device_patch.rb +55 -0
  34. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_box_edge_device_status.rb +21 -0
  35. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/data_policy.rb +16 -0
  36. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/day_of_week.rb +21 -0
  37. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/device_type.rb +15 -0
  38. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/download_phase.rb +18 -0
  39. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/encryption_algorithm.rb +17 -0
  40. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/file_event_trigger.rb +115 -0
  41. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/file_source_info.rb +46 -0
  42. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/install_reboot_behavior.rb +17 -0
  43. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/io_tdevice_info.rb +80 -0
  44. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/io_trole.rb +147 -0
  45. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/ipv4config.rb +71 -0
  46. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/ipv6config.rb +71 -0
  47. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job.rb +242 -0
  48. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job_error_details.rb +80 -0
  49. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job_error_item.rb +79 -0
  50. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job_status.rb +21 -0
  51. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/job_type.rb +20 -0
  52. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_aggregation_type.rb +21 -0
  53. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_category.rb +16 -0
  54. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_dimension_v1.rb +68 -0
  55. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_specification_v1.rb +187 -0
  56. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/metric_unit.rb +22 -0
  57. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/monitoring_status.rb +16 -0
  58. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/mount_point_map.rb +83 -0
  59. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter.rb +229 -0
  60. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter_dhcpstatus.rb +16 -0
  61. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter_position.rb +60 -0
  62. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter_rdmastatus.rb +16 -0
  63. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_adapter_status.rb +16 -0
  64. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_group.rb +17 -0
  65. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/network_settings.rb +83 -0
  66. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/node.rb +152 -0
  67. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/node_list.rb +56 -0
  68. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/node_status.rb +19 -0
  69. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/operation.rb +81 -0
  70. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/operation_display.rb +80 -0
  71. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/operations_list.rb +99 -0
  72. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/order.rb +177 -0
  73. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/order_list.rb +100 -0
  74. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/order_state.rb +28 -0
  75. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/order_status.rb +96 -0
  76. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/periodic_timer_event_trigger.rb +115 -0
  77. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/periodic_timer_source_info.rb +73 -0
  78. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/platform_type.rb +16 -0
  79. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/refresh_details.rb +87 -0
  80. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/resource_type_sku.rb +202 -0
  81. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role.rb +71 -0
  82. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role_list.rb +102 -0
  83. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role_sink_info.rb +46 -0
  84. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role_status.rb +16 -0
  85. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/role_types.rb +18 -0
  86. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/security_settings.rb +78 -0
  87. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/service_specification.rb +56 -0
  88. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share.rb +208 -0
  89. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_access_protocol.rb +16 -0
  90. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_access_right.rb +59 -0
  91. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_access_type.rb +17 -0
  92. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_list.rb +100 -0
  93. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/share_status.rb +19 -0
  94. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku.rb +61 -0
  95. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_cost.rb +71 -0
  96. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_information_list.rb +68 -0
  97. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_location_info.rb +87 -0
  98. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_name.rb +23 -0
  99. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_restriction.rb +94 -0
  100. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_restriction_info.rb +75 -0
  101. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_restriction_reason_code.rb +16 -0
  102. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sku_tier.rb +15 -0
  103. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/sslstatus.rb +16 -0
  104. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account.rb +134 -0
  105. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account_credential.rb +154 -0
  106. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account_credential_list.rb +100 -0
  107. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account_list.rb +101 -0
  108. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/storage_account_status.rb +19 -0
  109. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/symmetric_key.rb +48 -0
  110. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/time_grain.rb +22 -0
  111. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/tracking_info.rb +79 -0
  112. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/trigger.rb +71 -0
  113. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/trigger_list.rb +102 -0
  114. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_download_progress.rb +108 -0
  115. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_install_progress.rb +71 -0
  116. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_operation.rb +18 -0
  117. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_operation_stage.rb +31 -0
  118. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/update_summary.rb +281 -0
  119. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/upload_certificate_request.rb +58 -0
  120. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/upload_certificate_response.rb +132 -0
  121. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/user.rb +108 -0
  122. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/user_access_right.rb +59 -0
  123. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/user_list.rb +100 -0
  124. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/models/user_type.rb +17 -0
  125. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/module_definition.rb +9 -0
  126. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/nodes.rb +119 -0
  127. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/operations.rb +218 -0
  128. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/operations_status.rb +126 -0
  129. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/orders.rb +594 -0
  130. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/roles.rb +610 -0
  131. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/shares.rb +737 -0
  132. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/skus.rb +117 -0
  133. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/storage_account_credentials.rb +623 -0
  134. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/storage_accounts.rb +615 -0
  135. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/triggers.rb +618 -0
  136. data/lib/2019-08-01/generated/azure_mgmt_databoxedge/users.rb +622 -0
  137. data/lib/azure_mgmt_databoxedge.rb +6 -0
  138. data/lib/module_definition.rb +7 -0
  139. data/lib/profiles/latest/databoxedge_latest_profile_client.rb +40 -0
  140. data/lib/profiles/latest/databoxedge_module_definition.rb +8 -0
  141. data/lib/profiles/latest/modules/databoxedge_profile_module.rb +551 -0
  142. data/lib/version.rb +7 -0
  143. metadata +258 -0
@@ -0,0 +1,17 @@
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::DataBoxEdge::Mgmt::V2019_08_01
7
+ module Models
8
+ #
9
+ # Defines values for UserType
10
+ #
11
+ module UserType
12
+ Share = "Share"
13
+ LocalManagement = "LocalManagement"
14
+ ARM = "ARM"
15
+ end
16
+ end
17
+ 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::DataBoxEdge end
8
+ module Azure::DataBoxEdge::Mgmt end
9
+ module Azure::DataBoxEdge::Mgmt::V2019_08_01 end
@@ -0,0 +1,119 @@
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::DataBoxEdge::Mgmt::V2019_08_01
7
+ #
8
+ # Nodes
9
+ #
10
+ class Nodes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Nodes class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [DataBoxEdgeManagementClient] reference to the DataBoxEdgeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets all the nodes currently configured under this Data Box Edge device
26
+ #
27
+ # @param device_name [String] The device name.
28
+ # @param resource_group_name [String] The resource group name.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [NodeList] operation results.
33
+ #
34
+ def list_by_data_box_edge_device(device_name, resource_group_name, custom_headers:nil)
35
+ response = list_by_data_box_edge_device_async(device_name, resource_group_name, custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Gets all the nodes currently configured under this Data Box Edge device
41
+ #
42
+ # @param device_name [String] The device name.
43
+ # @param resource_group_name [String] The resource group name.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_by_data_box_edge_device_with_http_info(device_name, resource_group_name, custom_headers:nil)
50
+ list_by_data_box_edge_device_async(device_name, resource_group_name, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Gets all the nodes currently configured under this Data Box Edge device
55
+ #
56
+ # @param device_name [String] The device name.
57
+ # @param resource_group_name [String] The resource group name.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_by_data_box_edge_device_async(device_name, resource_group_name, custom_headers:nil)
64
+ fail ArgumentError, 'device_name is nil' if device_name.nil?
65
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
66
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+
69
+
70
+ request_headers = {}
71
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
72
+
73
+ # Set Headers
74
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
75
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
76
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes'
77
+
78
+ request_url = @base_url || @client.base_url
79
+
80
+ options = {
81
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
82
+ path_params: {'deviceName' => device_name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
83
+ query_params: {'api-version' => @client.api_version},
84
+ headers: request_headers.merge(custom_headers || {}),
85
+ base_url: request_url
86
+ }
87
+ promise = @client.make_request_async(:get, path_template, options)
88
+
89
+ promise = promise.then do |result|
90
+ http_response = result.response
91
+ status_code = http_response.status
92
+ response_content = http_response.body
93
+ unless status_code == 200
94
+ error_model = JSON.load(response_content)
95
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
96
+ end
97
+
98
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
99
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
100
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
101
+ # Deserialize Response
102
+ if status_code == 200
103
+ begin
104
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
105
+ result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::NodeList.mapper()
106
+ result.body = @client.deserialize(result_mapper, parsed_response)
107
+ rescue Exception => e
108
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
109
+ end
110
+ end
111
+
112
+ result
113
+ end
114
+
115
+ promise.execute
116
+ end
117
+
118
+ end
119
+ end
@@ -0,0 +1,218 @@
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::DataBoxEdge::Mgmt::V2019_08_01
7
+ #
8
+ # Operations
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 [DataBoxEdgeManagementClient] reference to the DataBoxEdgeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List all the supported 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
+ # List all the supported 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
+ # List all the supported 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.DataBoxEdge/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 MsRestAzure::AzureOperationError.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
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
91
+ # Deserialize Response
92
+ if status_code == 200
93
+ begin
94
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
95
+ result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::OperationsList.mapper()
96
+ result.body = @client.deserialize(result_mapper, parsed_response)
97
+ rescue Exception => e
98
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
99
+ end
100
+ end
101
+
102
+ result
103
+ end
104
+
105
+ promise.execute
106
+ end
107
+
108
+ #
109
+ # List all the supported operations.
110
+ #
111
+ # @param next_page_link [String] The NextLink from the previous successful call
112
+ # to List operation.
113
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
114
+ # will be added to the HTTP request.
115
+ #
116
+ # @return [OperationsList] operation results.
117
+ #
118
+ def list_next(next_page_link, custom_headers:nil)
119
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
120
+ response.body unless response.nil?
121
+ end
122
+
123
+ #
124
+ # List all the supported operations.
125
+ #
126
+ # @param next_page_link [String] The NextLink from the previous successful call
127
+ # to List operation.
128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
129
+ # will be added to the HTTP request.
130
+ #
131
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
132
+ #
133
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
134
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
135
+ end
136
+
137
+ #
138
+ # List all the supported operations.
139
+ #
140
+ # @param next_page_link [String] The NextLink from the previous successful call
141
+ # to List operation.
142
+ # @param [Hash{String => String}] A hash of custom headers that will be added
143
+ # to the HTTP request.
144
+ #
145
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
146
+ #
147
+ def list_next_async(next_page_link, custom_headers:nil)
148
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
149
+
150
+
151
+ request_headers = {}
152
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
153
+
154
+ # Set Headers
155
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
156
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
157
+ path_template = '{nextLink}'
158
+
159
+ request_url = @base_url || @client.base_url
160
+
161
+ options = {
162
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
163
+ skip_encoding_path_params: {'nextLink' => next_page_link},
164
+ headers: request_headers.merge(custom_headers || {}),
165
+ base_url: request_url
166
+ }
167
+ promise = @client.make_request_async(:get, path_template, options)
168
+
169
+ promise = promise.then do |result|
170
+ http_response = result.response
171
+ status_code = http_response.status
172
+ response_content = http_response.body
173
+ unless status_code == 200
174
+ error_model = JSON.load(response_content)
175
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
176
+ end
177
+
178
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
179
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
180
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
181
+ # Deserialize Response
182
+ if status_code == 200
183
+ begin
184
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
185
+ result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::OperationsList.mapper()
186
+ result.body = @client.deserialize(result_mapper, parsed_response)
187
+ rescue Exception => e
188
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
189
+ end
190
+ end
191
+
192
+ result
193
+ end
194
+
195
+ promise.execute
196
+ end
197
+
198
+ #
199
+ # List all the supported operations.
200
+ #
201
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
202
+ # will be added to the HTTP request.
203
+ #
204
+ # @return [OperationsList] which provide lazy access to pages of the response.
205
+ #
206
+ def list_as_lazy(custom_headers:nil)
207
+ response = list_async(custom_headers:custom_headers).value!
208
+ unless response.nil?
209
+ page = response.body
210
+ page.next_method = Proc.new do |next_page_link|
211
+ list_next_async(next_page_link, custom_headers:custom_headers)
212
+ end
213
+ page
214
+ end
215
+ end
216
+
217
+ end
218
+ end
@@ -0,0 +1,126 @@
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::DataBoxEdge::Mgmt::V2019_08_01
7
+ #
8
+ # OperationsStatus
9
+ #
10
+ class OperationsStatus
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the OperationsStatus class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [DataBoxEdgeManagementClient] reference to the DataBoxEdgeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets the details of a specified job on a Data Box Edge/Data Box Gateway
26
+ # device.
27
+ #
28
+ # @param device_name [String] The device name.
29
+ # @param name [String] The job name.
30
+ # @param resource_group_name [String] The resource group name.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Job] operation results.
35
+ #
36
+ def get(device_name, name, resource_group_name, custom_headers:nil)
37
+ response = get_async(device_name, name, resource_group_name, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Gets the details of a specified job on a Data Box Edge/Data Box Gateway
43
+ # device.
44
+ #
45
+ # @param device_name [String] The device name.
46
+ # @param name [String] The job name.
47
+ # @param resource_group_name [String] The resource group name.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def get_with_http_info(device_name, name, resource_group_name, custom_headers:nil)
54
+ get_async(device_name, name, resource_group_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Gets the details of a specified job on a Data Box Edge/Data Box Gateway
59
+ # device.
60
+ #
61
+ # @param device_name [String] The device name.
62
+ # @param name [String] The job name.
63
+ # @param resource_group_name [String] The resource group name.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def get_async(device_name, name, resource_group_name, custom_headers:nil)
70
+ fail ArgumentError, 'device_name is nil' if device_name.nil?
71
+ fail ArgumentError, 'name is nil' if name.nil?
72
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
73
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+
76
+
77
+ request_headers = {}
78
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
+
80
+ # Set Headers
81
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}'
84
+
85
+ request_url = @base_url || @client.base_url
86
+
87
+ options = {
88
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
+ path_params: {'deviceName' => device_name,'name' => name,'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
90
+ query_params: {'api-version' => @client.api_version},
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:get, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
103
+ end
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::DataBoxEdge::Mgmt::V2019_08_01::Models::Job.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ end
126
+ end