azure_mgmt_consumption 0.16.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (575) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  3. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/operation_list_result.rb +1 -1
  4. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/resource.rb +9 -0
  5. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +1 -1
  6. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/operations.rb +4 -0
  7. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/usage_details.rb +4 -0
  8. data/lib/2017-11-30/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  9. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/operation_list_result.rb +1 -1
  10. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/resource.rb +9 -0
  11. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +1 -1
  12. data/lib/2017-11-30/generated/azure_mgmt_consumption/operations.rb +4 -0
  13. data/lib/2017-11-30/generated/azure_mgmt_consumption/reservations_details.rb +2 -0
  14. data/lib/2017-11-30/generated/azure_mgmt_consumption/reservations_summaries.rb +2 -0
  15. data/lib/2017-11-30/generated/azure_mgmt_consumption/usage_details.rb +4 -0
  16. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/budgets.rb +8 -0
  17. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  18. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operation_list_result.rb +1 -1
  19. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/operations.rb +4 -0
  20. data/lib/2018-01-31/generated/azure_mgmt_consumption/budgets.rb +20 -0
  21. data/lib/2018-01-31/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  22. data/lib/2018-01-31/generated/azure_mgmt_consumption/marketplaces.rb +8 -0
  23. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/budgets_list_result.rb +1 -1
  24. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +1 -1
  25. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +1 -1
  26. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +1 -1
  27. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +1 -1
  28. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/resource.rb +9 -0
  29. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +1 -1
  30. data/lib/2018-01-31/generated/azure_mgmt_consumption/operations.rb +4 -0
  31. data/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb +32 -12
  32. data/lib/2018-01-31/generated/azure_mgmt_consumption/reservations_details.rb +8 -0
  33. data/lib/2018-01-31/generated/azure_mgmt_consumption/reservations_summaries.rb +8 -0
  34. data/lib/2018-01-31/generated/azure_mgmt_consumption/usage_details.rb +8 -0
  35. data/lib/2018-03-31/generated/azure_mgmt_consumption.rb +84 -0
  36. data/lib/2018-03-31/generated/azure_mgmt_consumption/budgets.rb +1013 -0
  37. data/lib/2018-03-31/generated/azure_mgmt_consumption/consumption_management_client.rb +291 -0
  38. data/lib/2018-03-31/generated/azure_mgmt_consumption/cost_tags_operations.rb +237 -0
  39. data/lib/2018-03-31/generated/azure_mgmt_consumption/get_balances_by_billing_account.rb +122 -0
  40. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces.rb +536 -0
  41. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_billing_account.rb +544 -0
  42. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_department.rb +544 -0
  43. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_enrollment_accounts.rb +544 -0
  44. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  45. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  46. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  47. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  48. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  49. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  50. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  51. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  52. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/cost_tag.rb +46 -0
  53. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/cost_tags.rb +90 -0
  54. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  55. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  56. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  57. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  58. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  59. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/marketplace.rb +375 -0
  60. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  61. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
  62. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  63. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  64. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  65. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  66. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  67. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +134 -0
  68. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  69. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  70. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  71. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_details.rb +187 -0
  72. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  73. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_recommendations.rb +224 -0
  74. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  75. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_summaries.rb +205 -0
  76. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +101 -0
  77. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  78. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  79. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  80. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/tags.rb +90 -0
  81. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  82. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/usage_detail.rb +355 -0
  83. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  84. data/lib/2018-03-31/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  85. data/lib/2018-03-31/generated/azure_mgmt_consumption/operations.rb +220 -0
  86. data/lib/2018-03-31/generated/azure_mgmt_consumption/price_sheet.rb +266 -0
  87. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservation_recommendations_operations.rb +230 -0
  88. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservations_details.rb +457 -0
  89. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservations_summaries.rb +473 -0
  90. data/lib/2018-03-31/generated/azure_mgmt_consumption/tags_operations.rb +115 -0
  91. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details.rb +585 -0
  92. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_billing_account.rb +607 -0
  93. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_department.rb +600 -0
  94. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_enrollment_account.rb +607 -0
  95. data/lib/2018-05-31/generated/azure_mgmt_consumption.rb +49 -0
  96. data/lib/2018-05-31/generated/azure_mgmt_consumption/consumption_management_client.rb +144 -0
  97. data/lib/2018-05-31/generated/azure_mgmt_consumption/forecasts.rb +124 -0
  98. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  99. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  100. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  101. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  102. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  103. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  104. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  105. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  106. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
  107. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  108. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  109. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  110. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  111. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  112. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  113. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  114. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/usage_detail.rb +403 -0
  115. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  116. data/lib/2018-05-31/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  117. data/lib/2018-05-31/generated/azure_mgmt_consumption/operations.rb +220 -0
  118. data/lib/2018-05-31/generated/azure_mgmt_consumption/price_sheet.rb +266 -0
  119. data/lib/2018-05-31/generated/azure_mgmt_consumption/usage_details.rb +2321 -0
  120. data/lib/2018-06-30/generated/azure_mgmt_consumption.rb +85 -0
  121. data/lib/2018-06-30/generated/azure_mgmt_consumption/balances.rb +214 -0
  122. data/lib/2018-06-30/generated/azure_mgmt_consumption/budgets.rb +1013 -0
  123. data/lib/2018-06-30/generated/azure_mgmt_consumption/consumption_management_client.rb +176 -0
  124. data/lib/2018-06-30/generated/azure_mgmt_consumption/cost_tags.rb +237 -0
  125. data/lib/2018-06-30/generated/azure_mgmt_consumption/forecasts.rb +124 -0
  126. data/lib/2018-06-30/generated/azure_mgmt_consumption/marketplaces.rb +2090 -0
  127. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  128. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  129. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  130. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  131. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  132. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  133. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  134. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  135. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  136. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  137. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/cost_tag.rb +90 -0
  138. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/cost_tag_properties.rb +46 -0
  139. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  140. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  141. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  142. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  143. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  144. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  145. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  146. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  147. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  148. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/marketplace.rb +375 -0
  149. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  150. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/meter_details.rb +146 -0
  151. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  152. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  153. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  154. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  155. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  156. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  157. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  158. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  159. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  160. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_detail.rb +187 -0
  161. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  162. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_recommendation.rb +224 -0
  163. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  164. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +100 -0
  165. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_summary.rb +205 -0
  166. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  167. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  168. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  169. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/tags_result.rb +90 -0
  170. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  171. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/usage_detail.rb +415 -0
  172. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  173. data/lib/2018-06-30/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  174. data/lib/2018-06-30/generated/azure_mgmt_consumption/operations.rb +220 -0
  175. data/lib/2018-06-30/generated/azure_mgmt_consumption/price_sheet.rb +266 -0
  176. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservation_recommendations.rb +230 -0
  177. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservations_details.rb +457 -0
  178. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservations_summaries.rb +473 -0
  179. data/lib/2018-06-30/generated/azure_mgmt_consumption/tags.rb +115 -0
  180. data/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb +2321 -0
  181. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption.rb +67 -0
  182. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/billing_profile_pricesheet.rb +161 -0
  183. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/charges_by_billing_account.rb +138 -0
  184. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/charges_by_billing_profile.rb +136 -0
  185. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/charges_by_invoice_section.rb +139 -0
  186. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +161 -0
  187. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/credit_summary_by_billing_profile.rb +122 -0
  188. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/events_by_billing_profile.rb +130 -0
  189. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/invoice_pricesheet.rb +161 -0
  190. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/lots_by_billing_profile.rb +122 -0
  191. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/address.rb +123 -0
  192. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/amount.rb +59 -0
  193. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/billing_account.rb +255 -0
  194. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/billing_profile.rb +161 -0
  195. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/charge_summary_by_billing_account.rb +194 -0
  196. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/charge_summary_by_billing_profile.rb +194 -0
  197. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/charge_summary_by_invoice_section.rb +194 -0
  198. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/charges_list_by_billing_account.rb +59 -0
  199. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/charges_list_by_billing_profile.rb +59 -0
  200. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/charges_list_by_invoice_section.rb +59 -0
  201. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/credit_balance_summary.rb +61 -0
  202. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/credit_summary.rb +131 -0
  203. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/department.rb +133 -0
  204. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/enrollment.rb +145 -0
  205. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/enrollment_account.rb +158 -0
  206. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/enrollment_policies.rb +83 -0
  207. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  208. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  209. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/event_summary.rb +192 -0
  210. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/event_type.rb +17 -0
  211. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/events.rb +56 -0
  212. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/invoice_section.rb +111 -0
  213. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/lot_source.rb +16 -0
  214. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/lot_summary.rb +154 -0
  215. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/lots.rb +56 -0
  216. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  217. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  218. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  219. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/pricesheet_download_response.rb +104 -0
  220. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  221. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  222. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  223. data/lib/2018-11-01-preview/generated/azure_mgmt_consumption/operations.rb +220 -0
  224. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption.rb +89 -0
  225. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/aggregated_cost.rb +229 -0
  226. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/balances.rb +214 -0
  227. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/budgets.rb +722 -0
  228. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/charges.rb +157 -0
  229. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +180 -0
  230. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/forecasts.rb +124 -0
  231. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/marketplaces.rb +339 -0
  232. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  233. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  234. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  235. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  236. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  237. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  238. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  239. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  240. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  241. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/charge_summary.rb +164 -0
  242. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  243. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/charges_list_result.rb +56 -0
  244. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  245. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  246. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  247. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  248. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  249. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  250. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  251. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  252. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  253. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/management_group_aggregated_cost_result.rb +228 -0
  254. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/marketplace.rb +388 -0
  255. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  256. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/meter_details.rb +146 -0
  257. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/meter_details_response.rb +98 -0
  258. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/metrictype.rb +17 -0
  259. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  260. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  261. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  262. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  263. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  264. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  265. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  266. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  267. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/reservation_detail.rb +187 -0
  268. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  269. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/reservation_recommendation.rb +224 -0
  270. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  271. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +100 -0
  272. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/reservation_summary.rb +205 -0
  273. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  274. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  275. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  276. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/tags_result.rb +90 -0
  277. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  278. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/usage_detail.rb +609 -0
  279. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/usage_details_download_response.rb +104 -0
  280. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  281. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  282. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/operations.rb +220 -0
  283. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/price_sheet.rb +266 -0
  284. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/reservation_recommendations.rb +230 -0
  285. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/reservations_details.rb +457 -0
  286. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/reservations_summaries.rb +473 -0
  287. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/tags.rb +148 -0
  288. data/lib/2019-04-01-preview/generated/azure_mgmt_consumption/usage_details.rb +568 -0
  289. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption.rb +89 -0
  290. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/aggregated_cost.rb +229 -0
  291. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/balances.rb +214 -0
  292. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/budgets.rb +722 -0
  293. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/charges.rb +157 -0
  294. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +180 -0
  295. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/forecasts.rb +124 -0
  296. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/marketplaces.rb +339 -0
  297. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  298. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  299. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  300. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  301. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  302. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  303. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  304. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  305. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  306. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/charge_summary.rb +164 -0
  307. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  308. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/charges_list_result.rb +56 -0
  309. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  310. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  311. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  312. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  313. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  314. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  315. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  316. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  317. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  318. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/management_group_aggregated_cost_result.rb +228 -0
  319. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/marketplace.rb +388 -0
  320. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  321. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/meter_details.rb +146 -0
  322. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/meter_details_response.rb +98 -0
  323. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/metrictype.rb +17 -0
  324. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  325. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  326. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  327. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  328. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  329. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  330. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  331. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  332. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/reservation_detail.rb +187 -0
  333. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  334. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/reservation_recommendation.rb +224 -0
  335. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  336. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +100 -0
  337. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/reservation_summary.rb +205 -0
  338. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  339. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  340. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  341. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/tags_result.rb +90 -0
  342. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  343. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/usage_detail.rb +609 -0
  344. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/usage_details_download_response.rb +104 -0
  345. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  346. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  347. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/operations.rb +220 -0
  348. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/price_sheet.rb +266 -0
  349. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/reservation_recommendations.rb +230 -0
  350. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/reservations_details.rb +457 -0
  351. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/reservations_summaries.rb +473 -0
  352. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/tags.rb +148 -0
  353. data/lib/2019-05-01-preview/generated/azure_mgmt_consumption/usage_details.rb +616 -0
  354. data/lib/2019-05-01/generated/azure_mgmt_consumption.rb +88 -0
  355. data/lib/2019-05-01/generated/azure_mgmt_consumption/aggregated_cost.rb +229 -0
  356. data/lib/2019-05-01/generated/azure_mgmt_consumption/balances.rb +214 -0
  357. data/lib/2019-05-01/generated/azure_mgmt_consumption/budgets.rb +722 -0
  358. data/lib/2019-05-01/generated/azure_mgmt_consumption/charges.rb +157 -0
  359. data/lib/2019-05-01/generated/azure_mgmt_consumption/consumption_management_client.rb +180 -0
  360. data/lib/2019-05-01/generated/azure_mgmt_consumption/forecasts.rb +124 -0
  361. data/lib/2019-05-01/generated/azure_mgmt_consumption/marketplaces.rb +339 -0
  362. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  363. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  364. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  365. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  366. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  367. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/budget.rb +172 -0
  368. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  369. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  370. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  371. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/charge_summary.rb +164 -0
  372. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  373. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/charges_list_result.rb +56 -0
  374. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  375. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  376. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  377. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  378. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  379. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  380. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  381. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  382. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  383. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/management_group_aggregated_cost_result.rb +228 -0
  384. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/marketplace.rb +388 -0
  385. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  386. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/meter_details.rb +146 -0
  387. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/meter_details_response.rb +98 -0
  388. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/metrictype.rb +17 -0
  389. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  390. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  391. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  392. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  393. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  394. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  395. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  396. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  397. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/reservation_detail.rb +211 -0
  398. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  399. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/reservation_recommendation.rb +272 -0
  400. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  401. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +100 -0
  402. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/reservation_summary.rb +205 -0
  403. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  404. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  405. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  406. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/tags_result.rb +90 -0
  407. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/time_grain_type.rb +20 -0
  408. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/usage_detail.rb +609 -0
  409. data/lib/2019-05-01/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  410. data/lib/2019-05-01/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  411. data/lib/2019-05-01/generated/azure_mgmt_consumption/operations.rb +220 -0
  412. data/lib/2019-05-01/generated/azure_mgmt_consumption/price_sheet.rb +266 -0
  413. data/lib/2019-05-01/generated/azure_mgmt_consumption/reservation_recommendations.rb +445 -0
  414. data/lib/2019-05-01/generated/azure_mgmt_consumption/reservations_details.rb +670 -0
  415. data/lib/2019-05-01/generated/azure_mgmt_consumption/reservations_summaries.rb +694 -0
  416. data/lib/2019-05-01/generated/azure_mgmt_consumption/tags.rb +148 -0
  417. data/lib/2019-05-01/generated/azure_mgmt_consumption/usage_details.rb +367 -0
  418. data/lib/2019-06-01/generated/azure_mgmt_consumption.rb +92 -0
  419. data/lib/2019-06-01/generated/azure_mgmt_consumption/aggregated_cost.rb +229 -0
  420. data/lib/2019-06-01/generated/azure_mgmt_consumption/balances.rb +214 -0
  421. data/lib/2019-06-01/generated/azure_mgmt_consumption/budgets.rb +722 -0
  422. data/lib/2019-06-01/generated/azure_mgmt_consumption/charges.rb +157 -0
  423. data/lib/2019-06-01/generated/azure_mgmt_consumption/consumption_management_client.rb +184 -0
  424. data/lib/2019-06-01/generated/azure_mgmt_consumption/forecasts.rb +124 -0
  425. data/lib/2019-06-01/generated/azure_mgmt_consumption/marketplaces.rb +339 -0
  426. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  427. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  428. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  429. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  430. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  431. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/budget.rb +172 -0
  432. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  433. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  434. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  435. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/charge_summary.rb +164 -0
  436. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  437. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/charges_list_result.rb +56 -0
  438. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  439. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  440. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  441. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  442. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  443. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  444. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  445. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  446. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  447. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/management_group_aggregated_cost_result.rb +228 -0
  448. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/marketplace.rb +388 -0
  449. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  450. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/meter_details.rb +146 -0
  451. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/meter_details_response.rb +98 -0
  452. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/metrictype.rb +17 -0
  453. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  454. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  455. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  456. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  457. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  458. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  459. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  460. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  461. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/reservation_detail.rb +223 -0
  462. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  463. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/reservation_recommendation.rb +293 -0
  464. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  465. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +100 -0
  466. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/reservation_summary.rb +278 -0
  467. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/reservation_transaction.rb +315 -0
  468. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/reservation_transactions_list_result.rb +101 -0
  469. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  470. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  471. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/sku_property.rb +59 -0
  472. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  473. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/tags_result.rb +90 -0
  474. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/time_grain_type.rb +20 -0
  475. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/usage_detail.rb +609 -0
  476. data/lib/2019-06-01/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  477. data/lib/2019-06-01/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  478. data/lib/2019-06-01/generated/azure_mgmt_consumption/operations.rb +220 -0
  479. data/lib/2019-06-01/generated/azure_mgmt_consumption/price_sheet.rb +266 -0
  480. data/lib/2019-06-01/generated/azure_mgmt_consumption/reservation_recommendations.rb +445 -0
  481. data/lib/2019-06-01/generated/azure_mgmt_consumption/reservation_transactions.rb +238 -0
  482. data/lib/2019-06-01/generated/azure_mgmt_consumption/reservations_details.rb +670 -0
  483. data/lib/2019-06-01/generated/azure_mgmt_consumption/reservations_summaries.rb +694 -0
  484. data/lib/2019-06-01/generated/azure_mgmt_consumption/tags.rb +148 -0
  485. data/lib/2019-06-01/generated/azure_mgmt_consumption/usage_details.rb +367 -0
  486. data/lib/2019-10-01/generated/azure_mgmt_consumption.rb +110 -0
  487. data/lib/2019-10-01/generated/azure_mgmt_consumption/aggregated_cost.rb +229 -0
  488. data/lib/2019-10-01/generated/azure_mgmt_consumption/balances.rb +214 -0
  489. data/lib/2019-10-01/generated/azure_mgmt_consumption/budgets.rb +722 -0
  490. data/lib/2019-10-01/generated/azure_mgmt_consumption/charges.rb +202 -0
  491. data/lib/2019-10-01/generated/azure_mgmt_consumption/consumption_management_client.rb +196 -0
  492. data/lib/2019-10-01/generated/azure_mgmt_consumption/credits.rb +119 -0
  493. data/lib/2019-10-01/generated/azure_mgmt_consumption/events_operations.rb +247 -0
  494. data/lib/2019-10-01/generated/azure_mgmt_consumption/forecasts.rb +124 -0
  495. data/lib/2019-10-01/generated/azure_mgmt_consumption/lots_operations.rb +230 -0
  496. data/lib/2019-10-01/generated/azure_mgmt_consumption/marketplaces.rb +331 -0
  497. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/amount.rb +59 -0
  498. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  499. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  500. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  501. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  502. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  503. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/budget.rb +172 -0
  504. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  505. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  506. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  507. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/charge_summary.rb +88 -0
  508. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  509. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/charges_list_result.rb +58 -0
  510. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/credit_balance_summary.rb +61 -0
  511. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/credit_summary.rb +132 -0
  512. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  513. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  514. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  515. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  516. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/event_summary.rb +193 -0
  517. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/event_type.rb +21 -0
  518. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/events.rb +100 -0
  519. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  520. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  521. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  522. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  523. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  524. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/legacy_charge_summary.rb +179 -0
  525. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/legacy_reservation_recommendation.rb +290 -0
  526. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/legacy_usage_detail.rb +624 -0
  527. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/lot_source.rb +16 -0
  528. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/lot_summary.rb +154 -0
  529. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/lots.rb +100 -0
  530. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/management_group_aggregated_cost_result.rb +228 -0
  531. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/marketplace.rb +388 -0
  532. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  533. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/meter_details.rb +146 -0
  534. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/meter_details_response.rb +98 -0
  535. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/metrictype.rb +17 -0
  536. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/modern_charge_summary.rb +230 -0
  537. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/modern_reservation_recommendation.rb +293 -0
  538. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/modern_usage_detail.rb +937 -0
  539. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  540. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  541. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  542. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  543. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  544. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  545. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  546. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  547. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/reservation_detail.rb +223 -0
  548. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  549. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/reservation_recommendation.rb +127 -0
  550. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +103 -0
  551. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +100 -0
  552. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/reservation_summary.rb +278 -0
  553. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/reservation_transaction.rb +328 -0
  554. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/reservation_transactions_list_result.rb +101 -0
  555. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/resource.rb +100 -0
  556. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  557. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/sku_property.rb +59 -0
  558. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  559. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/tags_result.rb +90 -0
  560. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/time_grain_type.rb +20 -0
  561. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/usage_detail.rb +88 -0
  562. data/lib/2019-10-01/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +103 -0
  563. data/lib/2019-10-01/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  564. data/lib/2019-10-01/generated/azure_mgmt_consumption/operations.rb +220 -0
  565. data/lib/2019-10-01/generated/azure_mgmt_consumption/price_sheet.rb +266 -0
  566. data/lib/2019-10-01/generated/azure_mgmt_consumption/reservation_recommendations.rb +254 -0
  567. data/lib/2019-10-01/generated/azure_mgmt_consumption/reservation_transactions.rb +238 -0
  568. data/lib/2019-10-01/generated/azure_mgmt_consumption/reservations_details.rb +697 -0
  569. data/lib/2019-10-01/generated/azure_mgmt_consumption/reservations_summaries.rb +729 -0
  570. data/lib/2019-10-01/generated/azure_mgmt_consumption/tags.rb +148 -0
  571. data/lib/2019-10-01/generated/azure_mgmt_consumption/usage_details.rb +403 -0
  572. data/lib/azure_mgmt_consumption.rb +9 -0
  573. data/lib/profiles/latest/modules/consumption_profile_module.rb +254 -82
  574. data/lib/version.rb +1 -1
  575. metadata +542 -5
@@ -0,0 +1,2321 @@
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::Consumption::Mgmt::V2018_05_31
7
+ #
8
+ # Consumption management client provides access to consumption resources for
9
+ # Azure Enterprise Subscriptions.
10
+ #
11
+ class UsageDetails
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the UsageDetails class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [ConsumptionManagementClient] reference to the ConsumptionManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Lists the usage details for a scope by current billing period. Usage details
27
+ # are available via this API only for May 1, 2014 or later.
28
+ #
29
+ # @param expand [String] May be used to expand the
30
+ # properties/additionalProperties or properties/meterDetails within a list of
31
+ # usage details. By default, these fields are not included when listing usage
32
+ # details.
33
+ # @param filter [String] May be used to filter usageDetails by
34
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
35
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
36
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
37
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
38
+ # string where key and value is separated by a colon (:).
39
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
40
+ # returned a partial result. If a previous response contains a nextLink
41
+ # element, the value of the nextLink element will include a skiptoken parameter
42
+ # that specifies a starting point to use for subsequent calls.
43
+ # @param top [Integer] May be used to limit the number of results to the most
44
+ # recent N usageDetails.
45
+ # @param query_options [QueryOptions] Additional parameters for the operation
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [Array<UsageDetail>] operation results.
50
+ #
51
+ def list(expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
52
+ first_page = list_as_lazy(expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
53
+ first_page.get_all_items
54
+ end
55
+
56
+ #
57
+ # Lists the usage details for a scope by current billing period. Usage details
58
+ # are available via this API only for May 1, 2014 or later.
59
+ #
60
+ # @param expand [String] May be used to expand the
61
+ # properties/additionalProperties or properties/meterDetails within a list of
62
+ # usage details. By default, these fields are not included when listing usage
63
+ # details.
64
+ # @param filter [String] May be used to filter usageDetails by
65
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
66
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
67
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
68
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
69
+ # string where key and value is separated by a colon (:).
70
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
71
+ # returned a partial result. If a previous response contains a nextLink
72
+ # element, the value of the nextLink element will include a skiptoken parameter
73
+ # that specifies a starting point to use for subsequent calls.
74
+ # @param top [Integer] May be used to limit the number of results to the most
75
+ # recent N usageDetails.
76
+ # @param query_options [QueryOptions] Additional parameters for the operation
77
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
78
+ # will be added to the HTTP request.
79
+ #
80
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
81
+ #
82
+ def list_with_http_info(expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
83
+ list_async(expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
84
+ end
85
+
86
+ #
87
+ # Lists the usage details for a scope by current billing period. Usage details
88
+ # are available via this API only for May 1, 2014 or later.
89
+ #
90
+ # @param expand [String] May be used to expand the
91
+ # properties/additionalProperties or properties/meterDetails within a list of
92
+ # usage details. By default, these fields are not included when listing usage
93
+ # details.
94
+ # @param filter [String] May be used to filter usageDetails by
95
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
96
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
97
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
98
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
99
+ # string where key and value is separated by a colon (:).
100
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
101
+ # returned a partial result. If a previous response contains a nextLink
102
+ # element, the value of the nextLink element will include a skiptoken parameter
103
+ # that specifies a starting point to use for subsequent calls.
104
+ # @param top [Integer] May be used to limit the number of results to the most
105
+ # recent N usageDetails.
106
+ # @param query_options [QueryOptions] Additional parameters for the operation
107
+ # @param [Hash{String => String}] A hash of custom headers that will be added
108
+ # to the HTTP request.
109
+ #
110
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
111
+ #
112
+ def list_async(expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
113
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
114
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
115
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
116
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
117
+
118
+ apply = nil
119
+ unless query_options.nil?
120
+ apply = query_options.Apply
121
+ end
122
+
123
+ request_headers = {}
124
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
125
+
126
+ # Set Headers
127
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
128
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
129
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Consumption/usageDetails'
130
+
131
+ request_url = @base_url || @client.base_url
132
+
133
+ options = {
134
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
135
+ path_params: {'subscriptionId' => @client.subscription_id},
136
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
137
+ headers: request_headers.merge(custom_headers || {}),
138
+ base_url: request_url
139
+ }
140
+ promise = @client.make_request_async(:get, path_template, options)
141
+
142
+ promise = promise.then do |result|
143
+ http_response = result.response
144
+ status_code = http_response.status
145
+ response_content = http_response.body
146
+ unless status_code == 200
147
+ error_model = JSON.load(response_content)
148
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
149
+ end
150
+
151
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
152
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
153
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
154
+ # Deserialize Response
155
+ if status_code == 200
156
+ begin
157
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
158
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
159
+ result.body = @client.deserialize(result_mapper, parsed_response)
160
+ rescue Exception => e
161
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
162
+ end
163
+ end
164
+
165
+ result
166
+ end
167
+
168
+ promise.execute
169
+ end
170
+
171
+ #
172
+ # Lists the usage details for a scope by billing period. Usage details are
173
+ # available via this API only for May 1, 2014 or later.
174
+ #
175
+ # @param billing_period_name [String] Billing Period Name.
176
+ # @param expand [String] May be used to expand the
177
+ # properties/additionalProperties or properties/meterDetails within a list of
178
+ # usage details. By default, these fields are not included when listing usage
179
+ # details.
180
+ # @param filter [String] May be used to filter usageDetails by
181
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
182
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
183
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
184
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
185
+ # where key and value is separated by a colon (:).
186
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
187
+ # returned a partial result. If a previous response contains a nextLink
188
+ # element, the value of the nextLink element will include a skiptoken parameter
189
+ # that specifies a starting point to use for subsequent calls.
190
+ # @param top [Integer] May be used to limit the number of results to the most
191
+ # recent N usageDetails.
192
+ # @param query_options [QueryOptions] Additional parameters for the operation
193
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
194
+ # will be added to the HTTP request.
195
+ #
196
+ # @return [Array<UsageDetail>] operation results.
197
+ #
198
+ def list_by_billing_period(billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
199
+ first_page = list_by_billing_period_as_lazy(billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
200
+ first_page.get_all_items
201
+ end
202
+
203
+ #
204
+ # Lists the usage details for a scope by billing period. Usage details are
205
+ # available via this API only for May 1, 2014 or later.
206
+ #
207
+ # @param billing_period_name [String] Billing Period Name.
208
+ # @param expand [String] May be used to expand the
209
+ # properties/additionalProperties or properties/meterDetails within a list of
210
+ # usage details. By default, these fields are not included when listing usage
211
+ # details.
212
+ # @param filter [String] May be used to filter usageDetails by
213
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
214
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
215
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
216
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
217
+ # where key and value is separated by a colon (:).
218
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
219
+ # returned a partial result. If a previous response contains a nextLink
220
+ # element, the value of the nextLink element will include a skiptoken parameter
221
+ # that specifies a starting point to use for subsequent calls.
222
+ # @param top [Integer] May be used to limit the number of results to the most
223
+ # recent N usageDetails.
224
+ # @param query_options [QueryOptions] Additional parameters for the operation
225
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
226
+ # will be added to the HTTP request.
227
+ #
228
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
229
+ #
230
+ def list_by_billing_period_with_http_info(billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
231
+ list_by_billing_period_async(billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
232
+ end
233
+
234
+ #
235
+ # Lists the usage details for a scope by billing period. Usage details are
236
+ # available via this API only for May 1, 2014 or later.
237
+ #
238
+ # @param billing_period_name [String] Billing Period Name.
239
+ # @param expand [String] May be used to expand the
240
+ # properties/additionalProperties or properties/meterDetails within a list of
241
+ # usage details. By default, these fields are not included when listing usage
242
+ # details.
243
+ # @param filter [String] May be used to filter usageDetails by
244
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
245
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
246
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
247
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
248
+ # where key and value is separated by a colon (:).
249
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
250
+ # returned a partial result. If a previous response contains a nextLink
251
+ # element, the value of the nextLink element will include a skiptoken parameter
252
+ # that specifies a starting point to use for subsequent calls.
253
+ # @param top [Integer] May be used to limit the number of results to the most
254
+ # recent N usageDetails.
255
+ # @param query_options [QueryOptions] Additional parameters for the operation
256
+ # @param [Hash{String => String}] A hash of custom headers that will be added
257
+ # to the HTTP request.
258
+ #
259
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
260
+ #
261
+ def list_by_billing_period_async(billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
262
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
263
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
264
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
265
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
266
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
267
+
268
+ apply = nil
269
+ unless query_options.nil?
270
+ apply = query_options.Apply
271
+ end
272
+
273
+ request_headers = {}
274
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
275
+
276
+ # Set Headers
277
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
278
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
279
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails'
280
+
281
+ request_url = @base_url || @client.base_url
282
+
283
+ options = {
284
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
285
+ path_params: {'subscriptionId' => @client.subscription_id,'billingPeriodName' => billing_period_name},
286
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
287
+ headers: request_headers.merge(custom_headers || {}),
288
+ base_url: request_url
289
+ }
290
+ promise = @client.make_request_async(:get, path_template, options)
291
+
292
+ promise = promise.then do |result|
293
+ http_response = result.response
294
+ status_code = http_response.status
295
+ response_content = http_response.body
296
+ unless status_code == 200
297
+ error_model = JSON.load(response_content)
298
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
299
+ end
300
+
301
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
302
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
303
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
304
+ # Deserialize Response
305
+ if status_code == 200
306
+ begin
307
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
308
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
309
+ result.body = @client.deserialize(result_mapper, parsed_response)
310
+ rescue Exception => e
311
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
312
+ end
313
+ end
314
+
315
+ result
316
+ end
317
+
318
+ promise.execute
319
+ end
320
+
321
+ #
322
+ # Lists the usage details by billingAccountId for a scope by current billing
323
+ # period. Usage details are available via this API only for May 1, 2014 or
324
+ # later.
325
+ #
326
+ # @param billing_account_id [String] BillingAccount ID
327
+ # @param expand [String] May be used to expand the
328
+ # properties/additionalProperties or properties/meterDetails within a list of
329
+ # usage details. By default, these fields are not included when listing usage
330
+ # details.
331
+ # @param filter [String] May be used to filter usageDetails by
332
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
333
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
334
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
335
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
336
+ # string where key and value is separated by a colon (:).
337
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
338
+ # returned a partial result. If a previous response contains a nextLink
339
+ # element, the value of the nextLink element will include a skiptoken parameter
340
+ # that specifies a starting point to use for subsequent calls.
341
+ # @param top [Integer] May be used to limit the number of results to the most
342
+ # recent N usageDetails.
343
+ # @param query_options [QueryOptions] Additional parameters for the operation
344
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
345
+ # will be added to the HTTP request.
346
+ #
347
+ # @return [Array<UsageDetail>] operation results.
348
+ #
349
+ def list_by_billing_account(billing_account_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
350
+ first_page = list_by_billing_account_as_lazy(billing_account_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
351
+ first_page.get_all_items
352
+ end
353
+
354
+ #
355
+ # Lists the usage details by billingAccountId for a scope by current billing
356
+ # period. Usage details are available via this API only for May 1, 2014 or
357
+ # later.
358
+ #
359
+ # @param billing_account_id [String] BillingAccount ID
360
+ # @param expand [String] May be used to expand the
361
+ # properties/additionalProperties or properties/meterDetails within a list of
362
+ # usage details. By default, these fields are not included when listing usage
363
+ # details.
364
+ # @param filter [String] May be used to filter usageDetails by
365
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
366
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
367
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
368
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
369
+ # string where key and value is separated by a colon (:).
370
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
371
+ # returned a partial result. If a previous response contains a nextLink
372
+ # element, the value of the nextLink element will include a skiptoken parameter
373
+ # that specifies a starting point to use for subsequent calls.
374
+ # @param top [Integer] May be used to limit the number of results to the most
375
+ # recent N usageDetails.
376
+ # @param query_options [QueryOptions] Additional parameters for the operation
377
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
378
+ # will be added to the HTTP request.
379
+ #
380
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
381
+ #
382
+ def list_by_billing_account_with_http_info(billing_account_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
383
+ list_by_billing_account_async(billing_account_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
384
+ end
385
+
386
+ #
387
+ # Lists the usage details by billingAccountId for a scope by current billing
388
+ # period. Usage details are available via this API only for May 1, 2014 or
389
+ # later.
390
+ #
391
+ # @param billing_account_id [String] BillingAccount ID
392
+ # @param expand [String] May be used to expand the
393
+ # properties/additionalProperties or properties/meterDetails within a list of
394
+ # usage details. By default, these fields are not included when listing usage
395
+ # details.
396
+ # @param filter [String] May be used to filter usageDetails by
397
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
398
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
399
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
400
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
401
+ # string where key and value is separated by a colon (:).
402
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
403
+ # returned a partial result. If a previous response contains a nextLink
404
+ # element, the value of the nextLink element will include a skiptoken parameter
405
+ # that specifies a starting point to use for subsequent calls.
406
+ # @param top [Integer] May be used to limit the number of results to the most
407
+ # recent N usageDetails.
408
+ # @param query_options [QueryOptions] Additional parameters for the operation
409
+ # @param [Hash{String => String}] A hash of custom headers that will be added
410
+ # to the HTTP request.
411
+ #
412
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
413
+ #
414
+ def list_by_billing_account_async(billing_account_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
415
+ fail ArgumentError, 'billing_account_id is nil' if billing_account_id.nil?
416
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
417
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
418
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
419
+
420
+ apply = nil
421
+ unless query_options.nil?
422
+ apply = query_options.Apply
423
+ end
424
+
425
+ request_headers = {}
426
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
427
+
428
+ # Set Headers
429
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
430
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
431
+ path_template = 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/usageDetails'
432
+
433
+ request_url = @base_url || @client.base_url
434
+
435
+ options = {
436
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
437
+ path_params: {'billingAccountId' => billing_account_id},
438
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
439
+ headers: request_headers.merge(custom_headers || {}),
440
+ base_url: request_url
441
+ }
442
+ promise = @client.make_request_async(:get, path_template, options)
443
+
444
+ promise = promise.then do |result|
445
+ http_response = result.response
446
+ status_code = http_response.status
447
+ response_content = http_response.body
448
+ unless status_code == 200
449
+ error_model = JSON.load(response_content)
450
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
451
+ end
452
+
453
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
454
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
455
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
456
+ # Deserialize Response
457
+ if status_code == 200
458
+ begin
459
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
460
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
461
+ result.body = @client.deserialize(result_mapper, parsed_response)
462
+ rescue Exception => e
463
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
464
+ end
465
+ end
466
+
467
+ result
468
+ end
469
+
470
+ promise.execute
471
+ end
472
+
473
+ #
474
+ # Lists the usage details based on billingAccountId for a scope by billing
475
+ # period. Usage details are available via this API only for May 1, 2014 or
476
+ # later.
477
+ #
478
+ # @param billing_account_id [String] BillingAccount ID
479
+ # @param billing_period_name [String] Billing Period Name.
480
+ # @param expand [String] May be used to expand the
481
+ # properties/additionalProperties or properties/meterDetails within a list of
482
+ # usage details. By default, these fields are not included when listing usage
483
+ # details.
484
+ # @param filter [String] May be used to filter usageDetails by
485
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
486
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
487
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
488
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
489
+ # where key and value is separated by a colon (:).
490
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
491
+ # returned a partial result. If a previous response contains a nextLink
492
+ # element, the value of the nextLink element will include a skiptoken parameter
493
+ # that specifies a starting point to use for subsequent calls.
494
+ # @param top [Integer] May be used to limit the number of results to the most
495
+ # recent N usageDetails.
496
+ # @param query_options [QueryOptions] Additional parameters for the operation
497
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
498
+ # will be added to the HTTP request.
499
+ #
500
+ # @return [Array<UsageDetail>] operation results.
501
+ #
502
+ def list_for_billing_period_by_billing_account(billing_account_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
503
+ first_page = list_for_billing_period_by_billing_account_as_lazy(billing_account_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
504
+ first_page.get_all_items
505
+ end
506
+
507
+ #
508
+ # Lists the usage details based on billingAccountId for a scope by billing
509
+ # period. Usage details are available via this API only for May 1, 2014 or
510
+ # later.
511
+ #
512
+ # @param billing_account_id [String] BillingAccount ID
513
+ # @param billing_period_name [String] Billing Period Name.
514
+ # @param expand [String] May be used to expand the
515
+ # properties/additionalProperties or properties/meterDetails within a list of
516
+ # usage details. By default, these fields are not included when listing usage
517
+ # details.
518
+ # @param filter [String] May be used to filter usageDetails by
519
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
520
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
521
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
522
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
523
+ # where key and value is separated by a colon (:).
524
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
525
+ # returned a partial result. If a previous response contains a nextLink
526
+ # element, the value of the nextLink element will include a skiptoken parameter
527
+ # that specifies a starting point to use for subsequent calls.
528
+ # @param top [Integer] May be used to limit the number of results to the most
529
+ # recent N usageDetails.
530
+ # @param query_options [QueryOptions] Additional parameters for the operation
531
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
532
+ # will be added to the HTTP request.
533
+ #
534
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
535
+ #
536
+ def list_for_billing_period_by_billing_account_with_http_info(billing_account_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
537
+ list_for_billing_period_by_billing_account_async(billing_account_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
538
+ end
539
+
540
+ #
541
+ # Lists the usage details based on billingAccountId for a scope by billing
542
+ # period. Usage details are available via this API only for May 1, 2014 or
543
+ # later.
544
+ #
545
+ # @param billing_account_id [String] BillingAccount ID
546
+ # @param billing_period_name [String] Billing Period Name.
547
+ # @param expand [String] May be used to expand the
548
+ # properties/additionalProperties or properties/meterDetails within a list of
549
+ # usage details. By default, these fields are not included when listing usage
550
+ # details.
551
+ # @param filter [String] May be used to filter usageDetails by
552
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
553
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
554
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
555
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
556
+ # where key and value is separated by a colon (:).
557
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
558
+ # returned a partial result. If a previous response contains a nextLink
559
+ # element, the value of the nextLink element will include a skiptoken parameter
560
+ # that specifies a starting point to use for subsequent calls.
561
+ # @param top [Integer] May be used to limit the number of results to the most
562
+ # recent N usageDetails.
563
+ # @param query_options [QueryOptions] Additional parameters for the operation
564
+ # @param [Hash{String => String}] A hash of custom headers that will be added
565
+ # to the HTTP request.
566
+ #
567
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
568
+ #
569
+ def list_for_billing_period_by_billing_account_async(billing_account_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
570
+ fail ArgumentError, 'billing_account_id is nil' if billing_account_id.nil?
571
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
572
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
573
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
574
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
575
+
576
+ apply = nil
577
+ unless query_options.nil?
578
+ apply = query_options.Apply
579
+ end
580
+
581
+ request_headers = {}
582
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
583
+
584
+ # Set Headers
585
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
586
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
587
+ path_template = 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails'
588
+
589
+ request_url = @base_url || @client.base_url
590
+
591
+ options = {
592
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
593
+ path_params: {'billingAccountId' => billing_account_id,'billingPeriodName' => billing_period_name},
594
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
595
+ headers: request_headers.merge(custom_headers || {}),
596
+ base_url: request_url
597
+ }
598
+ promise = @client.make_request_async(:get, path_template, options)
599
+
600
+ promise = promise.then do |result|
601
+ http_response = result.response
602
+ status_code = http_response.status
603
+ response_content = http_response.body
604
+ unless status_code == 200
605
+ error_model = JSON.load(response_content)
606
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
607
+ end
608
+
609
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
610
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
611
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
612
+ # Deserialize Response
613
+ if status_code == 200
614
+ begin
615
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
616
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
617
+ result.body = @client.deserialize(result_mapper, parsed_response)
618
+ rescue Exception => e
619
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
620
+ end
621
+ end
622
+
623
+ result
624
+ end
625
+
626
+ promise.execute
627
+ end
628
+
629
+ #
630
+ # Lists the usage details by departmentId for a scope by current billing
631
+ # period. Usage details are available via this API only for May 1, 2014 or
632
+ # later.
633
+ #
634
+ # @param department_id [String] Department ID
635
+ # @param expand [String] May be used to expand the
636
+ # properties/additionalProperties or properties/meterDetails within a list of
637
+ # usage details. By default, these fields are not included when listing usage
638
+ # details.
639
+ # @param filter [String] May be used to filter usageDetails by
640
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
641
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
642
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
643
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
644
+ # string where key and value is separated by a colon (:).
645
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
646
+ # returned a partial result. If a previous response contains a nextLink
647
+ # element, the value of the nextLink element will include a skiptoken parameter
648
+ # that specifies a starting point to use for subsequent calls.
649
+ # @param top [Integer] May be used to limit the number of results to the most
650
+ # recent N usageDetails.
651
+ # @param query_options [QueryOptions] Additional parameters for the operation
652
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
653
+ # will be added to the HTTP request.
654
+ #
655
+ # @return [Array<UsageDetail>] operation results.
656
+ #
657
+ def list_by_department(department_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
658
+ first_page = list_by_department_as_lazy(department_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
659
+ first_page.get_all_items
660
+ end
661
+
662
+ #
663
+ # Lists the usage details by departmentId for a scope by current billing
664
+ # period. Usage details are available via this API only for May 1, 2014 or
665
+ # later.
666
+ #
667
+ # @param department_id [String] Department ID
668
+ # @param expand [String] May be used to expand the
669
+ # properties/additionalProperties or properties/meterDetails within a list of
670
+ # usage details. By default, these fields are not included when listing usage
671
+ # details.
672
+ # @param filter [String] May be used to filter usageDetails by
673
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
674
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
675
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
676
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
677
+ # string where key and value is separated by a colon (:).
678
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
679
+ # returned a partial result. If a previous response contains a nextLink
680
+ # element, the value of the nextLink element will include a skiptoken parameter
681
+ # that specifies a starting point to use for subsequent calls.
682
+ # @param top [Integer] May be used to limit the number of results to the most
683
+ # recent N usageDetails.
684
+ # @param query_options [QueryOptions] Additional parameters for the operation
685
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
686
+ # will be added to the HTTP request.
687
+ #
688
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
689
+ #
690
+ def list_by_department_with_http_info(department_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
691
+ list_by_department_async(department_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
692
+ end
693
+
694
+ #
695
+ # Lists the usage details by departmentId for a scope by current billing
696
+ # period. Usage details are available via this API only for May 1, 2014 or
697
+ # later.
698
+ #
699
+ # @param department_id [String] Department ID
700
+ # @param expand [String] May be used to expand the
701
+ # properties/additionalProperties or properties/meterDetails within a list of
702
+ # usage details. By default, these fields are not included when listing usage
703
+ # details.
704
+ # @param filter [String] May be used to filter usageDetails by
705
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
706
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
707
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
708
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
709
+ # string where key and value is separated by a colon (:).
710
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
711
+ # returned a partial result. If a previous response contains a nextLink
712
+ # element, the value of the nextLink element will include a skiptoken parameter
713
+ # that specifies a starting point to use for subsequent calls.
714
+ # @param top [Integer] May be used to limit the number of results to the most
715
+ # recent N usageDetails.
716
+ # @param query_options [QueryOptions] Additional parameters for the operation
717
+ # @param [Hash{String => String}] A hash of custom headers that will be added
718
+ # to the HTTP request.
719
+ #
720
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
721
+ #
722
+ def list_by_department_async(department_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
723
+ fail ArgumentError, 'department_id is nil' if department_id.nil?
724
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
725
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
726
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
727
+
728
+ apply = nil
729
+ unless query_options.nil?
730
+ apply = query_options.Apply
731
+ end
732
+
733
+ request_headers = {}
734
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
735
+
736
+ # Set Headers
737
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
738
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
739
+ path_template = 'providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/usageDetails'
740
+
741
+ request_url = @base_url || @client.base_url
742
+
743
+ options = {
744
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
745
+ path_params: {'departmentId' => department_id},
746
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
747
+ headers: request_headers.merge(custom_headers || {}),
748
+ base_url: request_url
749
+ }
750
+ promise = @client.make_request_async(:get, path_template, options)
751
+
752
+ promise = promise.then do |result|
753
+ http_response = result.response
754
+ status_code = http_response.status
755
+ response_content = http_response.body
756
+ unless status_code == 200
757
+ error_model = JSON.load(response_content)
758
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
759
+ end
760
+
761
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
762
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
763
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
764
+ # Deserialize Response
765
+ if status_code == 200
766
+ begin
767
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
768
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
769
+ result.body = @client.deserialize(result_mapper, parsed_response)
770
+ rescue Exception => e
771
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
772
+ end
773
+ end
774
+
775
+ result
776
+ end
777
+
778
+ promise.execute
779
+ end
780
+
781
+ #
782
+ # Lists the usage details based on departmentId for a scope by billing period.
783
+ # Usage details are available via this API only for May 1, 2014 or later.
784
+ #
785
+ # @param department_id [String] Department ID
786
+ # @param billing_period_name [String] Billing Period Name.
787
+ # @param expand [String] May be used to expand the
788
+ # properties/additionalProperties or properties/meterDetails within a list of
789
+ # usage details. By default, these fields are not included when listing usage
790
+ # details.
791
+ # @param filter [String] May be used to filter usageDetails by
792
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
793
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
794
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
795
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
796
+ # where key and value is separated by a colon (:).
797
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
798
+ # returned a partial result. If a previous response contains a nextLink
799
+ # element, the value of the nextLink element will include a skiptoken parameter
800
+ # that specifies a starting point to use for subsequent calls.
801
+ # @param top [Integer] May be used to limit the number of results to the most
802
+ # recent N usageDetails.
803
+ # @param query_options [QueryOptions] Additional parameters for the operation
804
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
805
+ # will be added to the HTTP request.
806
+ #
807
+ # @return [Array<UsageDetail>] operation results.
808
+ #
809
+ def list_for_billing_period_by_department(department_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
810
+ first_page = list_for_billing_period_by_department_as_lazy(department_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
811
+ first_page.get_all_items
812
+ end
813
+
814
+ #
815
+ # Lists the usage details based on departmentId for a scope by billing period.
816
+ # Usage details are available via this API only for May 1, 2014 or later.
817
+ #
818
+ # @param department_id [String] Department ID
819
+ # @param billing_period_name [String] Billing Period Name.
820
+ # @param expand [String] May be used to expand the
821
+ # properties/additionalProperties or properties/meterDetails within a list of
822
+ # usage details. By default, these fields are not included when listing usage
823
+ # details.
824
+ # @param filter [String] May be used to filter usageDetails by
825
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
826
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
827
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
828
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
829
+ # where key and value is separated by a colon (:).
830
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
831
+ # returned a partial result. If a previous response contains a nextLink
832
+ # element, the value of the nextLink element will include a skiptoken parameter
833
+ # that specifies a starting point to use for subsequent calls.
834
+ # @param top [Integer] May be used to limit the number of results to the most
835
+ # recent N usageDetails.
836
+ # @param query_options [QueryOptions] Additional parameters for the operation
837
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
838
+ # will be added to the HTTP request.
839
+ #
840
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
841
+ #
842
+ def list_for_billing_period_by_department_with_http_info(department_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
843
+ list_for_billing_period_by_department_async(department_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
844
+ end
845
+
846
+ #
847
+ # Lists the usage details based on departmentId for a scope by billing period.
848
+ # Usage details are available via this API only for May 1, 2014 or later.
849
+ #
850
+ # @param department_id [String] Department ID
851
+ # @param billing_period_name [String] Billing Period Name.
852
+ # @param expand [String] May be used to expand the
853
+ # properties/additionalProperties or properties/meterDetails within a list of
854
+ # usage details. By default, these fields are not included when listing usage
855
+ # details.
856
+ # @param filter [String] May be used to filter usageDetails by
857
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
858
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
859
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
860
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
861
+ # where key and value is separated by a colon (:).
862
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
863
+ # returned a partial result. If a previous response contains a nextLink
864
+ # element, the value of the nextLink element will include a skiptoken parameter
865
+ # that specifies a starting point to use for subsequent calls.
866
+ # @param top [Integer] May be used to limit the number of results to the most
867
+ # recent N usageDetails.
868
+ # @param query_options [QueryOptions] Additional parameters for the operation
869
+ # @param [Hash{String => String}] A hash of custom headers that will be added
870
+ # to the HTTP request.
871
+ #
872
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
873
+ #
874
+ def list_for_billing_period_by_department_async(department_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
875
+ fail ArgumentError, 'department_id is nil' if department_id.nil?
876
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
877
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
878
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
879
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
880
+
881
+ apply = nil
882
+ unless query_options.nil?
883
+ apply = query_options.Apply
884
+ end
885
+
886
+ request_headers = {}
887
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
888
+
889
+ # Set Headers
890
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
891
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
892
+ path_template = 'providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails'
893
+
894
+ request_url = @base_url || @client.base_url
895
+
896
+ options = {
897
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
898
+ path_params: {'departmentId' => department_id,'billingPeriodName' => billing_period_name},
899
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
900
+ headers: request_headers.merge(custom_headers || {}),
901
+ base_url: request_url
902
+ }
903
+ promise = @client.make_request_async(:get, path_template, options)
904
+
905
+ promise = promise.then do |result|
906
+ http_response = result.response
907
+ status_code = http_response.status
908
+ response_content = http_response.body
909
+ unless status_code == 200
910
+ error_model = JSON.load(response_content)
911
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
912
+ end
913
+
914
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
915
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
916
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
917
+ # Deserialize Response
918
+ if status_code == 200
919
+ begin
920
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
921
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
922
+ result.body = @client.deserialize(result_mapper, parsed_response)
923
+ rescue Exception => e
924
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
925
+ end
926
+ end
927
+
928
+ result
929
+ end
930
+
931
+ promise.execute
932
+ end
933
+
934
+ #
935
+ # Lists the usage details by enrollmentAccountId for a scope by current billing
936
+ # period. Usage details are available via this API only for May 1, 2014 or
937
+ # later.
938
+ #
939
+ # @param enrollment_account_id [String] EnrollmentAccount ID
940
+ # @param expand [String] May be used to expand the
941
+ # properties/additionalProperties or properties/meterDetails within a list of
942
+ # usage details. By default, these fields are not included when listing usage
943
+ # details.
944
+ # @param filter [String] May be used to filter usageDetails by
945
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
946
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
947
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
948
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
949
+ # string where key and value is separated by a colon (:).
950
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
951
+ # returned a partial result. If a previous response contains a nextLink
952
+ # element, the value of the nextLink element will include a skiptoken parameter
953
+ # that specifies a starting point to use for subsequent calls.
954
+ # @param top [Integer] May be used to limit the number of results to the most
955
+ # recent N usageDetails.
956
+ # @param query_options [QueryOptions] Additional parameters for the operation
957
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
958
+ # will be added to the HTTP request.
959
+ #
960
+ # @return [Array<UsageDetail>] operation results.
961
+ #
962
+ def list_by_enrollment_account(enrollment_account_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
963
+ first_page = list_by_enrollment_account_as_lazy(enrollment_account_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
964
+ first_page.get_all_items
965
+ end
966
+
967
+ #
968
+ # Lists the usage details by enrollmentAccountId for a scope by current billing
969
+ # period. Usage details are available via this API only for May 1, 2014 or
970
+ # later.
971
+ #
972
+ # @param enrollment_account_id [String] EnrollmentAccount ID
973
+ # @param expand [String] May be used to expand the
974
+ # properties/additionalProperties or properties/meterDetails within a list of
975
+ # usage details. By default, these fields are not included when listing usage
976
+ # details.
977
+ # @param filter [String] May be used to filter usageDetails by
978
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
979
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
980
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
981
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
982
+ # string where key and value is separated by a colon (:).
983
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
984
+ # returned a partial result. If a previous response contains a nextLink
985
+ # element, the value of the nextLink element will include a skiptoken parameter
986
+ # that specifies a starting point to use for subsequent calls.
987
+ # @param top [Integer] May be used to limit the number of results to the most
988
+ # recent N usageDetails.
989
+ # @param query_options [QueryOptions] Additional parameters for the operation
990
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
991
+ # will be added to the HTTP request.
992
+ #
993
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
994
+ #
995
+ def list_by_enrollment_account_with_http_info(enrollment_account_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
996
+ list_by_enrollment_account_async(enrollment_account_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
997
+ end
998
+
999
+ #
1000
+ # Lists the usage details by enrollmentAccountId for a scope by current billing
1001
+ # period. Usage details are available via this API only for May 1, 2014 or
1002
+ # later.
1003
+ #
1004
+ # @param enrollment_account_id [String] EnrollmentAccount ID
1005
+ # @param expand [String] May be used to expand the
1006
+ # properties/additionalProperties or properties/meterDetails within a list of
1007
+ # usage details. By default, these fields are not included when listing usage
1008
+ # details.
1009
+ # @param filter [String] May be used to filter usageDetails by
1010
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1011
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
1012
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
1013
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
1014
+ # string where key and value is separated by a colon (:).
1015
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1016
+ # returned a partial result. If a previous response contains a nextLink
1017
+ # element, the value of the nextLink element will include a skiptoken parameter
1018
+ # that specifies a starting point to use for subsequent calls.
1019
+ # @param top [Integer] May be used to limit the number of results to the most
1020
+ # recent N usageDetails.
1021
+ # @param query_options [QueryOptions] Additional parameters for the operation
1022
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1023
+ # to the HTTP request.
1024
+ #
1025
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1026
+ #
1027
+ def list_by_enrollment_account_async(enrollment_account_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
1028
+ fail ArgumentError, 'enrollment_account_id is nil' if enrollment_account_id.nil?
1029
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
1030
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
1031
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1032
+
1033
+ apply = nil
1034
+ unless query_options.nil?
1035
+ apply = query_options.Apply
1036
+ end
1037
+
1038
+ request_headers = {}
1039
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1040
+
1041
+ # Set Headers
1042
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1043
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1044
+ path_template = 'providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/usageDetails'
1045
+
1046
+ request_url = @base_url || @client.base_url
1047
+
1048
+ options = {
1049
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1050
+ path_params: {'enrollmentAccountId' => enrollment_account_id},
1051
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
1052
+ headers: request_headers.merge(custom_headers || {}),
1053
+ base_url: request_url
1054
+ }
1055
+ promise = @client.make_request_async(:get, path_template, options)
1056
+
1057
+ promise = promise.then do |result|
1058
+ http_response = result.response
1059
+ status_code = http_response.status
1060
+ response_content = http_response.body
1061
+ unless status_code == 200
1062
+ error_model = JSON.load(response_content)
1063
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1064
+ end
1065
+
1066
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1067
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1068
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1069
+ # Deserialize Response
1070
+ if status_code == 200
1071
+ begin
1072
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1073
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1074
+ result.body = @client.deserialize(result_mapper, parsed_response)
1075
+ rescue Exception => e
1076
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1077
+ end
1078
+ end
1079
+
1080
+ result
1081
+ end
1082
+
1083
+ promise.execute
1084
+ end
1085
+
1086
+ #
1087
+ # Lists the usage details based on enrollmentAccountId for a scope by billing
1088
+ # period. Usage details are available via this API only for May 1, 2014 or
1089
+ # later.
1090
+ #
1091
+ # @param enrollment_account_id [String] EnrollmentAccount ID
1092
+ # @param billing_period_name [String] Billing Period Name.
1093
+ # @param expand [String] May be used to expand the
1094
+ # properties/additionalProperties or properties/meterDetails within a list of
1095
+ # usage details. By default, these fields are not included when listing usage
1096
+ # details.
1097
+ # @param filter [String] May be used to filter usageDetails by
1098
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1099
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1100
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1101
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
1102
+ # where key and value is separated by a colon (:).
1103
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1104
+ # returned a partial result. If a previous response contains a nextLink
1105
+ # element, the value of the nextLink element will include a skiptoken parameter
1106
+ # that specifies a starting point to use for subsequent calls.
1107
+ # @param top [Integer] May be used to limit the number of results to the most
1108
+ # recent N usageDetails.
1109
+ # @param query_options [QueryOptions] Additional parameters for the operation
1110
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1111
+ # will be added to the HTTP request.
1112
+ #
1113
+ # @return [Array<UsageDetail>] operation results.
1114
+ #
1115
+ def list_for_billing_period_by_enrollment_account(enrollment_account_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
1116
+ first_page = list_for_billing_period_by_enrollment_account_as_lazy(enrollment_account_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
1117
+ first_page.get_all_items
1118
+ end
1119
+
1120
+ #
1121
+ # Lists the usage details based on enrollmentAccountId for a scope by billing
1122
+ # period. Usage details are available via this API only for May 1, 2014 or
1123
+ # later.
1124
+ #
1125
+ # @param enrollment_account_id [String] EnrollmentAccount ID
1126
+ # @param billing_period_name [String] Billing Period Name.
1127
+ # @param expand [String] May be used to expand the
1128
+ # properties/additionalProperties or properties/meterDetails within a list of
1129
+ # usage details. By default, these fields are not included when listing usage
1130
+ # details.
1131
+ # @param filter [String] May be used to filter usageDetails by
1132
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1133
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1134
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1135
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
1136
+ # where key and value is separated by a colon (:).
1137
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1138
+ # returned a partial result. If a previous response contains a nextLink
1139
+ # element, the value of the nextLink element will include a skiptoken parameter
1140
+ # that specifies a starting point to use for subsequent calls.
1141
+ # @param top [Integer] May be used to limit the number of results to the most
1142
+ # recent N usageDetails.
1143
+ # @param query_options [QueryOptions] Additional parameters for the operation
1144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1145
+ # will be added to the HTTP request.
1146
+ #
1147
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1148
+ #
1149
+ def list_for_billing_period_by_enrollment_account_with_http_info(enrollment_account_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
1150
+ list_for_billing_period_by_enrollment_account_async(enrollment_account_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
1151
+ end
1152
+
1153
+ #
1154
+ # Lists the usage details based on enrollmentAccountId for a scope by billing
1155
+ # period. Usage details are available via this API only for May 1, 2014 or
1156
+ # later.
1157
+ #
1158
+ # @param enrollment_account_id [String] EnrollmentAccount ID
1159
+ # @param billing_period_name [String] Billing Period Name.
1160
+ # @param expand [String] May be used to expand the
1161
+ # properties/additionalProperties or properties/meterDetails within a list of
1162
+ # usage details. By default, these fields are not included when listing usage
1163
+ # details.
1164
+ # @param filter [String] May be used to filter usageDetails by
1165
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
1166
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
1167
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
1168
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
1169
+ # where key and value is separated by a colon (:).
1170
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
1171
+ # returned a partial result. If a previous response contains a nextLink
1172
+ # element, the value of the nextLink element will include a skiptoken parameter
1173
+ # that specifies a starting point to use for subsequent calls.
1174
+ # @param top [Integer] May be used to limit the number of results to the most
1175
+ # recent N usageDetails.
1176
+ # @param query_options [QueryOptions] Additional parameters for the operation
1177
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1178
+ # to the HTTP request.
1179
+ #
1180
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1181
+ #
1182
+ def list_for_billing_period_by_enrollment_account_async(enrollment_account_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
1183
+ fail ArgumentError, 'enrollment_account_id is nil' if enrollment_account_id.nil?
1184
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
1185
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
1186
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
1187
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1188
+
1189
+ apply = nil
1190
+ unless query_options.nil?
1191
+ apply = query_options.Apply
1192
+ end
1193
+
1194
+ request_headers = {}
1195
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1196
+
1197
+ # Set Headers
1198
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1199
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1200
+ path_template = 'providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails'
1201
+
1202
+ request_url = @base_url || @client.base_url
1203
+
1204
+ options = {
1205
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1206
+ path_params: {'enrollmentAccountId' => enrollment_account_id,'billingPeriodName' => billing_period_name},
1207
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
1208
+ headers: request_headers.merge(custom_headers || {}),
1209
+ base_url: request_url
1210
+ }
1211
+ promise = @client.make_request_async(:get, path_template, options)
1212
+
1213
+ promise = promise.then do |result|
1214
+ http_response = result.response
1215
+ status_code = http_response.status
1216
+ response_content = http_response.body
1217
+ unless status_code == 200
1218
+ error_model = JSON.load(response_content)
1219
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1220
+ end
1221
+
1222
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1223
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1224
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1225
+ # Deserialize Response
1226
+ if status_code == 200
1227
+ begin
1228
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1229
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1230
+ result.body = @client.deserialize(result_mapper, parsed_response)
1231
+ rescue Exception => e
1232
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1233
+ end
1234
+ end
1235
+
1236
+ result
1237
+ end
1238
+
1239
+ promise.execute
1240
+ end
1241
+
1242
+ #
1243
+ # Lists the usage details for a scope by current billing period. Usage details
1244
+ # are available via this API only for May 1, 2014 or later.
1245
+ #
1246
+ # @param next_page_link [String] The NextLink from the previous successful call
1247
+ # to List operation.
1248
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1249
+ # will be added to the HTTP request.
1250
+ #
1251
+ # @return [UsageDetailsListResult] operation results.
1252
+ #
1253
+ def list_next(next_page_link, custom_headers:nil)
1254
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1255
+ response.body unless response.nil?
1256
+ end
1257
+
1258
+ #
1259
+ # Lists the usage details for a scope by current billing period. Usage details
1260
+ # are available via this API only for May 1, 2014 or later.
1261
+ #
1262
+ # @param next_page_link [String] The NextLink from the previous successful call
1263
+ # to List operation.
1264
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1265
+ # will be added to the HTTP request.
1266
+ #
1267
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1268
+ #
1269
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1270
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1271
+ end
1272
+
1273
+ #
1274
+ # Lists the usage details for a scope by current billing period. Usage details
1275
+ # are available via this API only for May 1, 2014 or later.
1276
+ #
1277
+ # @param next_page_link [String] The NextLink from the previous successful call
1278
+ # to List operation.
1279
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1280
+ # to the HTTP request.
1281
+ #
1282
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1283
+ #
1284
+ def list_next_async(next_page_link, custom_headers:nil)
1285
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1286
+
1287
+
1288
+ request_headers = {}
1289
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1290
+
1291
+ # Set Headers
1292
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1293
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1294
+ path_template = '{nextLink}'
1295
+
1296
+ request_url = @base_url || @client.base_url
1297
+
1298
+ options = {
1299
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1300
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1301
+ headers: request_headers.merge(custom_headers || {}),
1302
+ base_url: request_url
1303
+ }
1304
+ promise = @client.make_request_async(:get, path_template, options)
1305
+
1306
+ promise = promise.then do |result|
1307
+ http_response = result.response
1308
+ status_code = http_response.status
1309
+ response_content = http_response.body
1310
+ unless status_code == 200
1311
+ error_model = JSON.load(response_content)
1312
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1313
+ end
1314
+
1315
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1316
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1317
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1318
+ # Deserialize Response
1319
+ if status_code == 200
1320
+ begin
1321
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1322
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1323
+ result.body = @client.deserialize(result_mapper, parsed_response)
1324
+ rescue Exception => e
1325
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1326
+ end
1327
+ end
1328
+
1329
+ result
1330
+ end
1331
+
1332
+ promise.execute
1333
+ end
1334
+
1335
+ #
1336
+ # Lists the usage details for a scope by billing period. Usage details are
1337
+ # available via this API only for May 1, 2014 or later.
1338
+ #
1339
+ # @param next_page_link [String] The NextLink from the previous successful call
1340
+ # to List operation.
1341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1342
+ # will be added to the HTTP request.
1343
+ #
1344
+ # @return [UsageDetailsListResult] operation results.
1345
+ #
1346
+ def list_by_billing_period_next(next_page_link, custom_headers:nil)
1347
+ response = list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers).value!
1348
+ response.body unless response.nil?
1349
+ end
1350
+
1351
+ #
1352
+ # Lists the usage details for a scope by billing period. Usage details are
1353
+ # available via this API only for May 1, 2014 or later.
1354
+ #
1355
+ # @param next_page_link [String] The NextLink from the previous successful call
1356
+ # to List operation.
1357
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1358
+ # will be added to the HTTP request.
1359
+ #
1360
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1361
+ #
1362
+ def list_by_billing_period_next_with_http_info(next_page_link, custom_headers:nil)
1363
+ list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers).value!
1364
+ end
1365
+
1366
+ #
1367
+ # Lists the usage details for a scope by billing period. Usage details are
1368
+ # available via this API only for May 1, 2014 or later.
1369
+ #
1370
+ # @param next_page_link [String] The NextLink from the previous successful call
1371
+ # to List operation.
1372
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1373
+ # to the HTTP request.
1374
+ #
1375
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1376
+ #
1377
+ def list_by_billing_period_next_async(next_page_link, custom_headers:nil)
1378
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1379
+
1380
+
1381
+ request_headers = {}
1382
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1383
+
1384
+ # Set Headers
1385
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1386
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1387
+ path_template = '{nextLink}'
1388
+
1389
+ request_url = @base_url || @client.base_url
1390
+
1391
+ options = {
1392
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1393
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1394
+ headers: request_headers.merge(custom_headers || {}),
1395
+ base_url: request_url
1396
+ }
1397
+ promise = @client.make_request_async(:get, path_template, options)
1398
+
1399
+ promise = promise.then do |result|
1400
+ http_response = result.response
1401
+ status_code = http_response.status
1402
+ response_content = http_response.body
1403
+ unless status_code == 200
1404
+ error_model = JSON.load(response_content)
1405
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1406
+ end
1407
+
1408
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1409
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1410
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1411
+ # Deserialize Response
1412
+ if status_code == 200
1413
+ begin
1414
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1415
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1416
+ result.body = @client.deserialize(result_mapper, parsed_response)
1417
+ rescue Exception => e
1418
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1419
+ end
1420
+ end
1421
+
1422
+ result
1423
+ end
1424
+
1425
+ promise.execute
1426
+ end
1427
+
1428
+ #
1429
+ # Lists the usage details by billingAccountId for a scope by current billing
1430
+ # period. Usage details are available via this API only for May 1, 2014 or
1431
+ # later.
1432
+ #
1433
+ # @param next_page_link [String] The NextLink from the previous successful call
1434
+ # to List operation.
1435
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1436
+ # will be added to the HTTP request.
1437
+ #
1438
+ # @return [UsageDetailsListResult] operation results.
1439
+ #
1440
+ def list_by_billing_account_next(next_page_link, custom_headers:nil)
1441
+ response = list_by_billing_account_next_async(next_page_link, custom_headers:custom_headers).value!
1442
+ response.body unless response.nil?
1443
+ end
1444
+
1445
+ #
1446
+ # Lists the usage details by billingAccountId for a scope by current billing
1447
+ # period. Usage details are available via this API only for May 1, 2014 or
1448
+ # later.
1449
+ #
1450
+ # @param next_page_link [String] The NextLink from the previous successful call
1451
+ # to List operation.
1452
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1453
+ # will be added to the HTTP request.
1454
+ #
1455
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1456
+ #
1457
+ def list_by_billing_account_next_with_http_info(next_page_link, custom_headers:nil)
1458
+ list_by_billing_account_next_async(next_page_link, custom_headers:custom_headers).value!
1459
+ end
1460
+
1461
+ #
1462
+ # Lists the usage details by billingAccountId for a scope by current billing
1463
+ # period. Usage details are available via this API only for May 1, 2014 or
1464
+ # later.
1465
+ #
1466
+ # @param next_page_link [String] The NextLink from the previous successful call
1467
+ # to List operation.
1468
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1469
+ # to the HTTP request.
1470
+ #
1471
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1472
+ #
1473
+ def list_by_billing_account_next_async(next_page_link, custom_headers:nil)
1474
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1475
+
1476
+
1477
+ request_headers = {}
1478
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1479
+
1480
+ # Set Headers
1481
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1482
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1483
+ path_template = '{nextLink}'
1484
+
1485
+ request_url = @base_url || @client.base_url
1486
+
1487
+ options = {
1488
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1489
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1490
+ headers: request_headers.merge(custom_headers || {}),
1491
+ base_url: request_url
1492
+ }
1493
+ promise = @client.make_request_async(:get, path_template, options)
1494
+
1495
+ promise = promise.then do |result|
1496
+ http_response = result.response
1497
+ status_code = http_response.status
1498
+ response_content = http_response.body
1499
+ unless status_code == 200
1500
+ error_model = JSON.load(response_content)
1501
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1502
+ end
1503
+
1504
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1505
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1506
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1507
+ # Deserialize Response
1508
+ if status_code == 200
1509
+ begin
1510
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1511
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1512
+ result.body = @client.deserialize(result_mapper, parsed_response)
1513
+ rescue Exception => e
1514
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1515
+ end
1516
+ end
1517
+
1518
+ result
1519
+ end
1520
+
1521
+ promise.execute
1522
+ end
1523
+
1524
+ #
1525
+ # Lists the usage details based on billingAccountId for a scope by billing
1526
+ # period. Usage details are available via this API only for May 1, 2014 or
1527
+ # later.
1528
+ #
1529
+ # @param next_page_link [String] The NextLink from the previous successful call
1530
+ # to List operation.
1531
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1532
+ # will be added to the HTTP request.
1533
+ #
1534
+ # @return [UsageDetailsListResult] operation results.
1535
+ #
1536
+ def list_for_billing_period_by_billing_account_next(next_page_link, custom_headers:nil)
1537
+ response = list_for_billing_period_by_billing_account_next_async(next_page_link, custom_headers:custom_headers).value!
1538
+ response.body unless response.nil?
1539
+ end
1540
+
1541
+ #
1542
+ # Lists the usage details based on billingAccountId for a scope by billing
1543
+ # period. Usage details are available via this API only for May 1, 2014 or
1544
+ # later.
1545
+ #
1546
+ # @param next_page_link [String] The NextLink from the previous successful call
1547
+ # to List operation.
1548
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1549
+ # will be added to the HTTP request.
1550
+ #
1551
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1552
+ #
1553
+ def list_for_billing_period_by_billing_account_next_with_http_info(next_page_link, custom_headers:nil)
1554
+ list_for_billing_period_by_billing_account_next_async(next_page_link, custom_headers:custom_headers).value!
1555
+ end
1556
+
1557
+ #
1558
+ # Lists the usage details based on billingAccountId for a scope by billing
1559
+ # period. Usage details are available via this API only for May 1, 2014 or
1560
+ # later.
1561
+ #
1562
+ # @param next_page_link [String] The NextLink from the previous successful call
1563
+ # to List operation.
1564
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1565
+ # to the HTTP request.
1566
+ #
1567
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1568
+ #
1569
+ def list_for_billing_period_by_billing_account_next_async(next_page_link, custom_headers:nil)
1570
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1571
+
1572
+
1573
+ request_headers = {}
1574
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1575
+
1576
+ # Set Headers
1577
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1578
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1579
+ path_template = '{nextLink}'
1580
+
1581
+ request_url = @base_url || @client.base_url
1582
+
1583
+ options = {
1584
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1585
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1586
+ headers: request_headers.merge(custom_headers || {}),
1587
+ base_url: request_url
1588
+ }
1589
+ promise = @client.make_request_async(:get, path_template, options)
1590
+
1591
+ promise = promise.then do |result|
1592
+ http_response = result.response
1593
+ status_code = http_response.status
1594
+ response_content = http_response.body
1595
+ unless status_code == 200
1596
+ error_model = JSON.load(response_content)
1597
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1598
+ end
1599
+
1600
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1601
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1602
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1603
+ # Deserialize Response
1604
+ if status_code == 200
1605
+ begin
1606
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1607
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1608
+ result.body = @client.deserialize(result_mapper, parsed_response)
1609
+ rescue Exception => e
1610
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1611
+ end
1612
+ end
1613
+
1614
+ result
1615
+ end
1616
+
1617
+ promise.execute
1618
+ end
1619
+
1620
+ #
1621
+ # Lists the usage details by departmentId for a scope by current billing
1622
+ # period. Usage details are available via this API only for May 1, 2014 or
1623
+ # later.
1624
+ #
1625
+ # @param next_page_link [String] The NextLink from the previous successful call
1626
+ # to List operation.
1627
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1628
+ # will be added to the HTTP request.
1629
+ #
1630
+ # @return [UsageDetailsListResult] operation results.
1631
+ #
1632
+ def list_by_department_next(next_page_link, custom_headers:nil)
1633
+ response = list_by_department_next_async(next_page_link, custom_headers:custom_headers).value!
1634
+ response.body unless response.nil?
1635
+ end
1636
+
1637
+ #
1638
+ # Lists the usage details by departmentId for a scope by current billing
1639
+ # period. Usage details are available via this API only for May 1, 2014 or
1640
+ # later.
1641
+ #
1642
+ # @param next_page_link [String] The NextLink from the previous successful call
1643
+ # to List operation.
1644
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1645
+ # will be added to the HTTP request.
1646
+ #
1647
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1648
+ #
1649
+ def list_by_department_next_with_http_info(next_page_link, custom_headers:nil)
1650
+ list_by_department_next_async(next_page_link, custom_headers:custom_headers).value!
1651
+ end
1652
+
1653
+ #
1654
+ # Lists the usage details by departmentId for a scope by current billing
1655
+ # period. Usage details are available via this API only for May 1, 2014 or
1656
+ # later.
1657
+ #
1658
+ # @param next_page_link [String] The NextLink from the previous successful call
1659
+ # to List operation.
1660
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1661
+ # to the HTTP request.
1662
+ #
1663
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1664
+ #
1665
+ def list_by_department_next_async(next_page_link, custom_headers:nil)
1666
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1667
+
1668
+
1669
+ request_headers = {}
1670
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1671
+
1672
+ # Set Headers
1673
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1674
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1675
+ path_template = '{nextLink}'
1676
+
1677
+ request_url = @base_url || @client.base_url
1678
+
1679
+ options = {
1680
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1681
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1682
+ headers: request_headers.merge(custom_headers || {}),
1683
+ base_url: request_url
1684
+ }
1685
+ promise = @client.make_request_async(:get, path_template, options)
1686
+
1687
+ promise = promise.then do |result|
1688
+ http_response = result.response
1689
+ status_code = http_response.status
1690
+ response_content = http_response.body
1691
+ unless status_code == 200
1692
+ error_model = JSON.load(response_content)
1693
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1694
+ end
1695
+
1696
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1697
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1698
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1699
+ # Deserialize Response
1700
+ if status_code == 200
1701
+ begin
1702
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1703
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1704
+ result.body = @client.deserialize(result_mapper, parsed_response)
1705
+ rescue Exception => e
1706
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1707
+ end
1708
+ end
1709
+
1710
+ result
1711
+ end
1712
+
1713
+ promise.execute
1714
+ end
1715
+
1716
+ #
1717
+ # Lists the usage details based on departmentId for a scope by billing period.
1718
+ # Usage details are available via this API only for May 1, 2014 or later.
1719
+ #
1720
+ # @param next_page_link [String] The NextLink from the previous successful call
1721
+ # to List operation.
1722
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1723
+ # will be added to the HTTP request.
1724
+ #
1725
+ # @return [UsageDetailsListResult] operation results.
1726
+ #
1727
+ def list_for_billing_period_by_department_next(next_page_link, custom_headers:nil)
1728
+ response = list_for_billing_period_by_department_next_async(next_page_link, custom_headers:custom_headers).value!
1729
+ response.body unless response.nil?
1730
+ end
1731
+
1732
+ #
1733
+ # Lists the usage details based on departmentId for a scope by billing period.
1734
+ # Usage details are available via this API only for May 1, 2014 or later.
1735
+ #
1736
+ # @param next_page_link [String] The NextLink from the previous successful call
1737
+ # to List operation.
1738
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1739
+ # will be added to the HTTP request.
1740
+ #
1741
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1742
+ #
1743
+ def list_for_billing_period_by_department_next_with_http_info(next_page_link, custom_headers:nil)
1744
+ list_for_billing_period_by_department_next_async(next_page_link, custom_headers:custom_headers).value!
1745
+ end
1746
+
1747
+ #
1748
+ # Lists the usage details based on departmentId for a scope by billing period.
1749
+ # Usage details are available via this API only for May 1, 2014 or later.
1750
+ #
1751
+ # @param next_page_link [String] The NextLink from the previous successful call
1752
+ # to List operation.
1753
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1754
+ # to the HTTP request.
1755
+ #
1756
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1757
+ #
1758
+ def list_for_billing_period_by_department_next_async(next_page_link, custom_headers:nil)
1759
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1760
+
1761
+
1762
+ request_headers = {}
1763
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1764
+
1765
+ # Set Headers
1766
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1767
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1768
+ path_template = '{nextLink}'
1769
+
1770
+ request_url = @base_url || @client.base_url
1771
+
1772
+ options = {
1773
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1774
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1775
+ headers: request_headers.merge(custom_headers || {}),
1776
+ base_url: request_url
1777
+ }
1778
+ promise = @client.make_request_async(:get, path_template, options)
1779
+
1780
+ promise = promise.then do |result|
1781
+ http_response = result.response
1782
+ status_code = http_response.status
1783
+ response_content = http_response.body
1784
+ unless status_code == 200
1785
+ error_model = JSON.load(response_content)
1786
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1787
+ end
1788
+
1789
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1790
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1791
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1792
+ # Deserialize Response
1793
+ if status_code == 200
1794
+ begin
1795
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1796
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1797
+ result.body = @client.deserialize(result_mapper, parsed_response)
1798
+ rescue Exception => e
1799
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1800
+ end
1801
+ end
1802
+
1803
+ result
1804
+ end
1805
+
1806
+ promise.execute
1807
+ end
1808
+
1809
+ #
1810
+ # Lists the usage details by enrollmentAccountId for a scope by current billing
1811
+ # period. Usage details are available via this API only for May 1, 2014 or
1812
+ # later.
1813
+ #
1814
+ # @param next_page_link [String] The NextLink from the previous successful call
1815
+ # to List operation.
1816
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1817
+ # will be added to the HTTP request.
1818
+ #
1819
+ # @return [UsageDetailsListResult] operation results.
1820
+ #
1821
+ def list_by_enrollment_account_next(next_page_link, custom_headers:nil)
1822
+ response = list_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
1823
+ response.body unless response.nil?
1824
+ end
1825
+
1826
+ #
1827
+ # Lists the usage details by enrollmentAccountId for a scope by current billing
1828
+ # period. Usage details are available via this API only for May 1, 2014 or
1829
+ # later.
1830
+ #
1831
+ # @param next_page_link [String] The NextLink from the previous successful call
1832
+ # to List operation.
1833
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1834
+ # will be added to the HTTP request.
1835
+ #
1836
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1837
+ #
1838
+ def list_by_enrollment_account_next_with_http_info(next_page_link, custom_headers:nil)
1839
+ list_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
1840
+ end
1841
+
1842
+ #
1843
+ # Lists the usage details by enrollmentAccountId for a scope by current billing
1844
+ # period. Usage details are available via this API only for May 1, 2014 or
1845
+ # later.
1846
+ #
1847
+ # @param next_page_link [String] The NextLink from the previous successful call
1848
+ # to List operation.
1849
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1850
+ # to the HTTP request.
1851
+ #
1852
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1853
+ #
1854
+ def list_by_enrollment_account_next_async(next_page_link, custom_headers:nil)
1855
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1856
+
1857
+
1858
+ request_headers = {}
1859
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1860
+
1861
+ # Set Headers
1862
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1863
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1864
+ path_template = '{nextLink}'
1865
+
1866
+ request_url = @base_url || @client.base_url
1867
+
1868
+ options = {
1869
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1870
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1871
+ headers: request_headers.merge(custom_headers || {}),
1872
+ base_url: request_url
1873
+ }
1874
+ promise = @client.make_request_async(:get, path_template, options)
1875
+
1876
+ promise = promise.then do |result|
1877
+ http_response = result.response
1878
+ status_code = http_response.status
1879
+ response_content = http_response.body
1880
+ unless status_code == 200
1881
+ error_model = JSON.load(response_content)
1882
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1883
+ end
1884
+
1885
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1886
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1887
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1888
+ # Deserialize Response
1889
+ if status_code == 200
1890
+ begin
1891
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1892
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1893
+ result.body = @client.deserialize(result_mapper, parsed_response)
1894
+ rescue Exception => e
1895
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1896
+ end
1897
+ end
1898
+
1899
+ result
1900
+ end
1901
+
1902
+ promise.execute
1903
+ end
1904
+
1905
+ #
1906
+ # Lists the usage details based on enrollmentAccountId for a scope by billing
1907
+ # period. Usage details are available via this API only for May 1, 2014 or
1908
+ # later.
1909
+ #
1910
+ # @param next_page_link [String] The NextLink from the previous successful call
1911
+ # to List operation.
1912
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1913
+ # will be added to the HTTP request.
1914
+ #
1915
+ # @return [UsageDetailsListResult] operation results.
1916
+ #
1917
+ def list_for_billing_period_by_enrollment_account_next(next_page_link, custom_headers:nil)
1918
+ response = list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
1919
+ response.body unless response.nil?
1920
+ end
1921
+
1922
+ #
1923
+ # Lists the usage details based on enrollmentAccountId for a scope by billing
1924
+ # period. Usage details are available via this API only for May 1, 2014 or
1925
+ # later.
1926
+ #
1927
+ # @param next_page_link [String] The NextLink from the previous successful call
1928
+ # to List operation.
1929
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1930
+ # will be added to the HTTP request.
1931
+ #
1932
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1933
+ #
1934
+ def list_for_billing_period_by_enrollment_account_next_with_http_info(next_page_link, custom_headers:nil)
1935
+ list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers).value!
1936
+ end
1937
+
1938
+ #
1939
+ # Lists the usage details based on enrollmentAccountId for a scope by billing
1940
+ # period. Usage details are available via this API only for May 1, 2014 or
1941
+ # later.
1942
+ #
1943
+ # @param next_page_link [String] The NextLink from the previous successful call
1944
+ # to List operation.
1945
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1946
+ # to the HTTP request.
1947
+ #
1948
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1949
+ #
1950
+ def list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:nil)
1951
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1952
+
1953
+
1954
+ request_headers = {}
1955
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1956
+
1957
+ # Set Headers
1958
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1959
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1960
+ path_template = '{nextLink}'
1961
+
1962
+ request_url = @base_url || @client.base_url
1963
+
1964
+ options = {
1965
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1966
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1967
+ headers: request_headers.merge(custom_headers || {}),
1968
+ base_url: request_url
1969
+ }
1970
+ promise = @client.make_request_async(:get, path_template, options)
1971
+
1972
+ promise = promise.then do |result|
1973
+ http_response = result.response
1974
+ status_code = http_response.status
1975
+ response_content = http_response.body
1976
+ unless status_code == 200
1977
+ error_model = JSON.load(response_content)
1978
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1979
+ end
1980
+
1981
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1982
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1983
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1984
+ # Deserialize Response
1985
+ if status_code == 200
1986
+ begin
1987
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1988
+ result_mapper = Azure::Consumption::Mgmt::V2018_05_31::Models::UsageDetailsListResult.mapper()
1989
+ result.body = @client.deserialize(result_mapper, parsed_response)
1990
+ rescue Exception => e
1991
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1992
+ end
1993
+ end
1994
+
1995
+ result
1996
+ end
1997
+
1998
+ promise.execute
1999
+ end
2000
+
2001
+ #
2002
+ # Lists the usage details for a scope by current billing period. Usage details
2003
+ # are available via this API only for May 1, 2014 or later.
2004
+ #
2005
+ # @param expand [String] May be used to expand the
2006
+ # properties/additionalProperties or properties/meterDetails within a list of
2007
+ # usage details. By default, these fields are not included when listing usage
2008
+ # details.
2009
+ # @param filter [String] May be used to filter usageDetails by
2010
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2011
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
2012
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
2013
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
2014
+ # string where key and value is separated by a colon (:).
2015
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2016
+ # returned a partial result. If a previous response contains a nextLink
2017
+ # element, the value of the nextLink element will include a skiptoken parameter
2018
+ # that specifies a starting point to use for subsequent calls.
2019
+ # @param top [Integer] May be used to limit the number of results to the most
2020
+ # recent N usageDetails.
2021
+ # @param query_options [QueryOptions] Additional parameters for the operation
2022
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2023
+ # will be added to the HTTP request.
2024
+ #
2025
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
2026
+ # response.
2027
+ #
2028
+ def list_as_lazy(expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
2029
+ response = list_async(expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
2030
+ unless response.nil?
2031
+ page = response.body
2032
+ page.next_method = Proc.new do |next_page_link|
2033
+ list_next_async(next_page_link, custom_headers:custom_headers)
2034
+ end
2035
+ page
2036
+ end
2037
+ end
2038
+
2039
+ #
2040
+ # Lists the usage details for a scope by billing period. Usage details are
2041
+ # available via this API only for May 1, 2014 or later.
2042
+ #
2043
+ # @param billing_period_name [String] Billing Period Name.
2044
+ # @param expand [String] May be used to expand the
2045
+ # properties/additionalProperties or properties/meterDetails within a list of
2046
+ # usage details. By default, these fields are not included when listing usage
2047
+ # details.
2048
+ # @param filter [String] May be used to filter usageDetails by
2049
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2050
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
2051
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
2052
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
2053
+ # where key and value is separated by a colon (:).
2054
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2055
+ # returned a partial result. If a previous response contains a nextLink
2056
+ # element, the value of the nextLink element will include a skiptoken parameter
2057
+ # that specifies a starting point to use for subsequent calls.
2058
+ # @param top [Integer] May be used to limit the number of results to the most
2059
+ # recent N usageDetails.
2060
+ # @param query_options [QueryOptions] Additional parameters for the operation
2061
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2062
+ # will be added to the HTTP request.
2063
+ #
2064
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
2065
+ # response.
2066
+ #
2067
+ def list_by_billing_period_as_lazy(billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
2068
+ response = list_by_billing_period_async(billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
2069
+ unless response.nil?
2070
+ page = response.body
2071
+ page.next_method = Proc.new do |next_page_link|
2072
+ list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers)
2073
+ end
2074
+ page
2075
+ end
2076
+ end
2077
+
2078
+ #
2079
+ # Lists the usage details by billingAccountId for a scope by current billing
2080
+ # period. Usage details are available via this API only for May 1, 2014 or
2081
+ # later.
2082
+ #
2083
+ # @param billing_account_id [String] BillingAccount ID
2084
+ # @param expand [String] May be used to expand the
2085
+ # properties/additionalProperties or properties/meterDetails within a list of
2086
+ # usage details. By default, these fields are not included when listing usage
2087
+ # details.
2088
+ # @param filter [String] May be used to filter usageDetails by
2089
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2090
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
2091
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
2092
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
2093
+ # string where key and value is separated by a colon (:).
2094
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2095
+ # returned a partial result. If a previous response contains a nextLink
2096
+ # element, the value of the nextLink element will include a skiptoken parameter
2097
+ # that specifies a starting point to use for subsequent calls.
2098
+ # @param top [Integer] May be used to limit the number of results to the most
2099
+ # recent N usageDetails.
2100
+ # @param query_options [QueryOptions] Additional parameters for the operation
2101
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2102
+ # will be added to the HTTP request.
2103
+ #
2104
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
2105
+ # response.
2106
+ #
2107
+ def list_by_billing_account_as_lazy(billing_account_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
2108
+ response = list_by_billing_account_async(billing_account_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
2109
+ unless response.nil?
2110
+ page = response.body
2111
+ page.next_method = Proc.new do |next_page_link|
2112
+ list_by_billing_account_next_async(next_page_link, custom_headers:custom_headers)
2113
+ end
2114
+ page
2115
+ end
2116
+ end
2117
+
2118
+ #
2119
+ # Lists the usage details based on billingAccountId for a scope by billing
2120
+ # period. Usage details are available via this API only for May 1, 2014 or
2121
+ # later.
2122
+ #
2123
+ # @param billing_account_id [String] BillingAccount ID
2124
+ # @param billing_period_name [String] Billing Period Name.
2125
+ # @param expand [String] May be used to expand the
2126
+ # properties/additionalProperties or properties/meterDetails within a list of
2127
+ # usage details. By default, these fields are not included when listing usage
2128
+ # details.
2129
+ # @param filter [String] May be used to filter usageDetails by
2130
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2131
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
2132
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
2133
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
2134
+ # where key and value is separated by a colon (:).
2135
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2136
+ # returned a partial result. If a previous response contains a nextLink
2137
+ # element, the value of the nextLink element will include a skiptoken parameter
2138
+ # that specifies a starting point to use for subsequent calls.
2139
+ # @param top [Integer] May be used to limit the number of results to the most
2140
+ # recent N usageDetails.
2141
+ # @param query_options [QueryOptions] Additional parameters for the operation
2142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2143
+ # will be added to the HTTP request.
2144
+ #
2145
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
2146
+ # response.
2147
+ #
2148
+ def list_for_billing_period_by_billing_account_as_lazy(billing_account_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
2149
+ response = list_for_billing_period_by_billing_account_async(billing_account_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
2150
+ unless response.nil?
2151
+ page = response.body
2152
+ page.next_method = Proc.new do |next_page_link|
2153
+ list_for_billing_period_by_billing_account_next_async(next_page_link, custom_headers:custom_headers)
2154
+ end
2155
+ page
2156
+ end
2157
+ end
2158
+
2159
+ #
2160
+ # Lists the usage details by departmentId for a scope by current billing
2161
+ # period. Usage details are available via this API only for May 1, 2014 or
2162
+ # later.
2163
+ #
2164
+ # @param department_id [String] Department ID
2165
+ # @param expand [String] May be used to expand the
2166
+ # properties/additionalProperties or properties/meterDetails within a list of
2167
+ # usage details. By default, these fields are not included when listing usage
2168
+ # details.
2169
+ # @param filter [String] May be used to filter usageDetails by
2170
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2171
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
2172
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
2173
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
2174
+ # string where key and value is separated by a colon (:).
2175
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2176
+ # returned a partial result. If a previous response contains a nextLink
2177
+ # element, the value of the nextLink element will include a skiptoken parameter
2178
+ # that specifies a starting point to use for subsequent calls.
2179
+ # @param top [Integer] May be used to limit the number of results to the most
2180
+ # recent N usageDetails.
2181
+ # @param query_options [QueryOptions] Additional parameters for the operation
2182
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2183
+ # will be added to the HTTP request.
2184
+ #
2185
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
2186
+ # response.
2187
+ #
2188
+ def list_by_department_as_lazy(department_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
2189
+ response = list_by_department_async(department_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
2190
+ unless response.nil?
2191
+ page = response.body
2192
+ page.next_method = Proc.new do |next_page_link|
2193
+ list_by_department_next_async(next_page_link, custom_headers:custom_headers)
2194
+ end
2195
+ page
2196
+ end
2197
+ end
2198
+
2199
+ #
2200
+ # Lists the usage details based on departmentId for a scope by billing period.
2201
+ # Usage details are available via this API only for May 1, 2014 or later.
2202
+ #
2203
+ # @param department_id [String] Department ID
2204
+ # @param billing_period_name [String] Billing Period Name.
2205
+ # @param expand [String] May be used to expand the
2206
+ # properties/additionalProperties or properties/meterDetails within a list of
2207
+ # usage details. By default, these fields are not included when listing usage
2208
+ # details.
2209
+ # @param filter [String] May be used to filter usageDetails by
2210
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2211
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
2212
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
2213
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
2214
+ # where key and value is separated by a colon (:).
2215
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2216
+ # returned a partial result. If a previous response contains a nextLink
2217
+ # element, the value of the nextLink element will include a skiptoken parameter
2218
+ # that specifies a starting point to use for subsequent calls.
2219
+ # @param top [Integer] May be used to limit the number of results to the most
2220
+ # recent N usageDetails.
2221
+ # @param query_options [QueryOptions] Additional parameters for the operation
2222
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2223
+ # will be added to the HTTP request.
2224
+ #
2225
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
2226
+ # response.
2227
+ #
2228
+ def list_for_billing_period_by_department_as_lazy(department_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
2229
+ response = list_for_billing_period_by_department_async(department_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
2230
+ unless response.nil?
2231
+ page = response.body
2232
+ page.next_method = Proc.new do |next_page_link|
2233
+ list_for_billing_period_by_department_next_async(next_page_link, custom_headers:custom_headers)
2234
+ end
2235
+ page
2236
+ end
2237
+ end
2238
+
2239
+ #
2240
+ # Lists the usage details by enrollmentAccountId for a scope by current billing
2241
+ # period. Usage details are available via this API only for May 1, 2014 or
2242
+ # later.
2243
+ #
2244
+ # @param enrollment_account_id [String] EnrollmentAccount ID
2245
+ # @param expand [String] May be used to expand the
2246
+ # properties/additionalProperties or properties/meterDetails within a list of
2247
+ # usage details. By default, these fields are not included when listing usage
2248
+ # details.
2249
+ # @param filter [String] May be used to filter usageDetails by
2250
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2251
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
2252
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
2253
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
2254
+ # string where key and value is separated by a colon (:).
2255
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2256
+ # returned a partial result. If a previous response contains a nextLink
2257
+ # element, the value of the nextLink element will include a skiptoken parameter
2258
+ # that specifies a starting point to use for subsequent calls.
2259
+ # @param top [Integer] May be used to limit the number of results to the most
2260
+ # recent N usageDetails.
2261
+ # @param query_options [QueryOptions] Additional parameters for the operation
2262
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2263
+ # will be added to the HTTP request.
2264
+ #
2265
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
2266
+ # response.
2267
+ #
2268
+ def list_by_enrollment_account_as_lazy(enrollment_account_id, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
2269
+ response = list_by_enrollment_account_async(enrollment_account_id, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
2270
+ unless response.nil?
2271
+ page = response.body
2272
+ page.next_method = Proc.new do |next_page_link|
2273
+ list_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers)
2274
+ end
2275
+ page
2276
+ end
2277
+ end
2278
+
2279
+ #
2280
+ # Lists the usage details based on enrollmentAccountId for a scope by billing
2281
+ # period. Usage details are available via this API only for May 1, 2014 or
2282
+ # later.
2283
+ #
2284
+ # @param enrollment_account_id [String] EnrollmentAccount ID
2285
+ # @param billing_period_name [String] Billing Period Name.
2286
+ # @param expand [String] May be used to expand the
2287
+ # properties/additionalProperties or properties/meterDetails within a list of
2288
+ # usage details. By default, these fields are not included when listing usage
2289
+ # details.
2290
+ # @param filter [String] May be used to filter usageDetails by
2291
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
2292
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
2293
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
2294
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
2295
+ # where key and value is separated by a colon (:).
2296
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
2297
+ # returned a partial result. If a previous response contains a nextLink
2298
+ # element, the value of the nextLink element will include a skiptoken parameter
2299
+ # that specifies a starting point to use for subsequent calls.
2300
+ # @param top [Integer] May be used to limit the number of results to the most
2301
+ # recent N usageDetails.
2302
+ # @param query_options [QueryOptions] Additional parameters for the operation
2303
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2304
+ # will be added to the HTTP request.
2305
+ #
2306
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
2307
+ # response.
2308
+ #
2309
+ def list_for_billing_period_by_enrollment_account_as_lazy(enrollment_account_id, billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
2310
+ response = list_for_billing_period_by_enrollment_account_async(enrollment_account_id, billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
2311
+ unless response.nil?
2312
+ page = response.body
2313
+ page.next_method = Proc.new do |next_page_link|
2314
+ list_for_billing_period_by_enrollment_account_next_async(next_page_link, custom_headers:custom_headers)
2315
+ end
2316
+ page
2317
+ end
2318
+ end
2319
+
2320
+ end
2321
+ end