azure_mgmt_media_services 0.16.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-10-01/generated/azure_mgmt_media_services/media_services_management_client.rb +1 -1
  3. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services.rb +213 -0
  4. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/assets.rb +946 -0
  5. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/azure_media_services.rb +176 -0
  6. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/content_key_policies.rb +815 -0
  7. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/jobs.rb +702 -0
  8. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/live_events.rb +1285 -0
  9. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/live_outputs.rb +706 -0
  10. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/locations.rb +130 -0
  11. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/mediaservices.rb +1069 -0
  12. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/aac_audio.rb +95 -0
  13. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/aac_audio_profile.rb +17 -0
  14. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/akamai_access_control.rb +56 -0
  15. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/akamai_signature_header_authentication_key.rb +68 -0
  16. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/api_error.rb +47 -0
  17. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/asset.rb +157 -0
  18. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/asset_collection.rb +99 -0
  19. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/asset_container_permission.rb +17 -0
  20. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/asset_container_sas.rb +54 -0
  21. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/asset_storage_encryption_format.rb +16 -0
  22. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/asset_storage_encryption_key.rb +46 -0
  23. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/audio.rb +92 -0
  24. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/audio_analyzer_preset.rb +66 -0
  25. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/audio_overlay.rb +98 -0
  26. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/built_in_standard_encoder_preset.rb +66 -0
  27. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/cbcs_drm_configuration.rb +73 -0
  28. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/cenc_drm_configuration.rb +61 -0
  29. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/check_name_availability_input.rb +58 -0
  30. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/codec.rb +66 -0
  31. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/common_encryption_cbcs.rb +95 -0
  32. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/common_encryption_cenc.rb +95 -0
  33. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy.rb +129 -0
  34. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_clear_key_configuration.rb +50 -0
  35. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_collection.rb +100 -0
  36. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_configuration.rb +51 -0
  37. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_configuration.rb +111 -0
  38. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_rental_and_lease_key_type.rb +18 -0
  39. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_open_restriction.rb +51 -0
  40. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_option.rb +87 -0
  41. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_configuration.rb +82 -0
  42. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_encryption_key_from_header.rb +51 -0
  43. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_encryption_key_from_key_identifier.rb +64 -0
  44. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_key_location.rb +49 -0
  45. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_type.rb +18 -0
  46. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_explicit_analog_television_restriction.rb +61 -0
  47. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_license.rb +156 -0
  48. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_license_type.rb +17 -0
  49. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_play_right.rb +196 -0
  50. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_unknown_output_passing_option.rb +18 -0
  51. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_properties.rb +102 -0
  52. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_restriction.rb +49 -0
  53. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_restriction_token_key.rb +49 -0
  54. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_restriction_token_type.rb +17 -0
  55. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_rsa_token_key.rb +72 -0
  56. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_symmetric_token_key.rb +61 -0
  57. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_token_claim.rb +57 -0
  58. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_token_restriction.rb +156 -0
  59. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_unknown_configuration.rb +51 -0
  60. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_unknown_restriction.rb +51 -0
  61. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_widevine_configuration.rb +61 -0
  62. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/content_key_policy_x509certificate_token_key.rb +62 -0
  63. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/copy_audio.rb +58 -0
  64. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/copy_video.rb +59 -0
  65. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/cross_site_access_policies.rb +58 -0
  66. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/default_key.rb +59 -0
  67. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/deinterlace.rb +62 -0
  68. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/deinterlace_mode.rb +16 -0
  69. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/deinterlace_parity.rb +17 -0
  70. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/enabled_protocols.rb +79 -0
  71. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/encoder_named_preset.rb +19 -0
  72. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/encryption_scheme.rb +18 -0
  73. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/entity_name_availability_check_output.rb +69 -0
  74. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/entropy_mode.rb +16 -0
  75. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/envelope_encryption.rb +94 -0
  76. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/filters.rb +98 -0
  77. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/format.rb +69 -0
  78. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/h264complexity.rb +17 -0
  79. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/h264layer.rb +191 -0
  80. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/h264video.rb +124 -0
  81. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/h264video_profile.rb +20 -0
  82. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/hls.rb +47 -0
  83. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/image.rb +121 -0
  84. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/image_format.rb +58 -0
  85. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/ipaccess_control.rb +55 -0
  86. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/iprange.rb +68 -0
  87. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job.rb +166 -0
  88. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_collection.rb +99 -0
  89. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_error.rb +117 -0
  90. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_error_category.rb +19 -0
  91. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_error_code.rb +23 -0
  92. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_error_detail.rb +59 -0
  93. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_input.rb +65 -0
  94. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_input_asset.rb +85 -0
  95. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_input_clip.rb +77 -0
  96. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_input_http.rb +87 -0
  97. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_inputs.rb +80 -0
  98. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_output.rb +90 -0
  99. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_output_asset.rb +90 -0
  100. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_retry.rb +16 -0
  101. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/job_state.rb +21 -0
  102. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/jpg_format.rb +58 -0
  103. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/jpg_image.rb +121 -0
  104. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/jpg_layer.rb +86 -0
  105. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/layer.rb +93 -0
  106. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/list_container_sas_input.rb +60 -0
  107. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/list_content_keys_response.rb +56 -0
  108. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/list_paths_response.rb +76 -0
  109. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event.rb +227 -0
  110. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_action_input.rb +46 -0
  111. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_encoding.rb +59 -0
  112. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_encoding_type.rb +16 -0
  113. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_endpoint.rb +57 -0
  114. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_input.rb +92 -0
  115. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_input_protocol.rb +16 -0
  116. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_list_result.rb +110 -0
  117. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_preview.rb +91 -0
  118. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_preview_access_control.rb +47 -0
  119. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_event_resource_state.rb +19 -0
  120. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_output.rb +181 -0
  121. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_output_list_result.rb +111 -0
  122. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/live_output_resource_state.rb +17 -0
  123. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/location.rb +47 -0
  124. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/media_service.rb +118 -0
  125. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/media_service_collection.rb +99 -0
  126. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/mp4format.rb +75 -0
  127. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/multi_bitrate_format.rb +84 -0
  128. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/no_encryption.rb +47 -0
  129. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/odata_error.rb +89 -0
  130. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/on_error_type.rb +16 -0
  131. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/operation.rb +58 -0
  132. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/operation_collection.rb +99 -0
  133. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/operation_display.rb +79 -0
  134. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/output_file.rb +59 -0
  135. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/overlay.rb +132 -0
  136. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/png_format.rb +58 -0
  137. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/png_image.rb +121 -0
  138. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/png_layer.rb +74 -0
  139. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/preset.rb +50 -0
  140. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/priority.rb +17 -0
  141. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/provider.rb +46 -0
  142. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/proxy_resource.rb +62 -0
  143. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/rectangle.rb +88 -0
  144. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/resource.rb +71 -0
  145. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/rotation.rb +20 -0
  146. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/standard_encoder_preset.rb +110 -0
  147. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/storage_account.rb +63 -0
  148. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/storage_account_type.rb +16 -0
  149. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/stream_options_flag.rb +16 -0
  150. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_endpoint.rb +284 -0
  151. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_endpoint_access_control.rb +60 -0
  152. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_endpoint_list_result.rb +111 -0
  153. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_endpoint_resource_state.rb +20 -0
  154. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_entity_scale_unit.rb +47 -0
  155. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_locator.rb +169 -0
  156. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_locator_collection.rb +100 -0
  157. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_locator_content_key.rb +113 -0
  158. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_locator_content_key_type.rb +17 -0
  159. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_locator_user_defined_content_key.rb +69 -0
  160. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_path.rb +82 -0
  161. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_policy.rb +133 -0
  162. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_policy_collection.rb +99 -0
  163. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_policy_content_key.rb +78 -0
  164. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_policy_content_keys.rb +68 -0
  165. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_policy_fair_play_configuration.rb +59 -0
  166. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_policy_play_ready_configuration.rb +59 -0
  167. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_policy_streaming_protocol.rb +18 -0
  168. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/streaming_policy_widevine_configuration.rb +48 -0
  169. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/stretch_mode.rb +17 -0
  170. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/subscription_media_service.rb +118 -0
  171. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb +100 -0
  172. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb +46 -0
  173. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/track_property_compare_operation.rb +16 -0
  174. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/track_property_condition.rb +72 -0
  175. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/track_property_type.rb +16 -0
  176. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/track_selection.rb +56 -0
  177. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/tracked_resource.rb +92 -0
  178. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/transform.rb +123 -0
  179. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/transform_collection.rb +99 -0
  180. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/transform_output.rb +83 -0
  181. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/transport_stream_format.rb +76 -0
  182. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/video.rb +86 -0
  183. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/video_analyzer_preset.rb +71 -0
  184. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/video_layer.rb +156 -0
  185. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/video_overlay.rb +136 -0
  186. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/module_definition.rb +9 -0
  187. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/operations.rb +229 -0
  188. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb +1308 -0
  189. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_locators.rb +794 -0
  190. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/streaming_policies.rb +584 -0
  191. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/transforms.rb +714 -0
  192. data/lib/azure_mgmt_media_services.rb +1 -0
  193. data/lib/profiles/latest/modules/mediaservices_profile_module.rb +699 -55
  194. data/lib/version.rb +1 -1
  195. metadata +192 -3
@@ -0,0 +1,130 @@
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::MediaServices::Mgmt::V2018_03_30_preview
7
+ #
8
+ # Locations
9
+ #
10
+ class Locations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Locations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AzureMediaServices] reference to the AzureMediaServices
22
+ attr_reader :client
23
+
24
+ #
25
+ # Check Name Availability
26
+ #
27
+ # Checks whether the Media Service resource name is available.
28
+ #
29
+ # @param location_name [String]
30
+ # @param parameters [CheckNameAvailabilityInput] The request parameters
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [EntityNameAvailabilityCheckOutput] operation results.
35
+ #
36
+ def check_name_availability(location_name, parameters, custom_headers:nil)
37
+ response = check_name_availability_async(location_name, parameters, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Check Name Availability
43
+ #
44
+ # Checks whether the Media Service resource name is available.
45
+ #
46
+ # @param location_name [String]
47
+ # @param parameters [CheckNameAvailabilityInput] The request parameters
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def check_name_availability_with_http_info(location_name, parameters, custom_headers:nil)
54
+ check_name_availability_async(location_name, parameters, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Check Name Availability
59
+ #
60
+ # Checks whether the Media Service resource name is available.
61
+ #
62
+ # @param location_name [String]
63
+ # @param parameters [CheckNameAvailabilityInput] The request parameters
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def check_name_availability_async(location_name, parameters, custom_headers:nil)
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
72
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+
75
+
76
+ request_headers = {}
77
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
78
+
79
+ # Set Headers
80
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
81
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
82
+
83
+ # Serialize Request
84
+ request_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::CheckNameAvailabilityInput.mapper()
85
+ request_content = @client.serialize(request_mapper, parameters)
86
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
87
+
88
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability'
89
+
90
+ request_url = @base_url || @client.base_url
91
+
92
+ options = {
93
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
94
+ path_params: {'subscriptionId' => @client.subscription_id,'locationName' => location_name},
95
+ query_params: {'api-version' => @client.api_version},
96
+ body: request_content,
97
+ headers: request_headers.merge(custom_headers || {}),
98
+ base_url: request_url
99
+ }
100
+ promise = @client.make_request_async(:post, path_template, options)
101
+
102
+ promise = promise.then do |result|
103
+ http_response = result.response
104
+ status_code = http_response.status
105
+ response_content = http_response.body
106
+ unless status_code == 200
107
+ error_model = JSON.load(response_content)
108
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
109
+ end
110
+
111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ # Deserialize Response
113
+ if status_code == 200
114
+ begin
115
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
116
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::EntityNameAvailabilityCheckOutput.mapper()
117
+ result.body = @client.deserialize(result_mapper, parsed_response)
118
+ rescue Exception => e
119
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
120
+ end
121
+ end
122
+
123
+ result
124
+ end
125
+
126
+ promise.execute
127
+ end
128
+
129
+ end
130
+ end
@@ -0,0 +1,1069 @@
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::MediaServices::Mgmt::V2018_03_30_preview
7
+ #
8
+ # Mediaservices
9
+ #
10
+ class Mediaservices
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Mediaservices class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AzureMediaServices] reference to the AzureMediaServices
22
+ attr_reader :client
23
+
24
+ #
25
+ # List Media Services accounts
26
+ #
27
+ # List Media Services accounts in the resource group
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # Azure subscription.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Array<MediaService>] operation results.
35
+ #
36
+ def list(resource_group_name, custom_headers:nil)
37
+ first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers)
38
+ first_page.get_all_items
39
+ end
40
+
41
+ #
42
+ # List Media Services accounts
43
+ #
44
+ # List Media Services accounts in the resource group
45
+ #
46
+ # @param resource_group_name [String] The name of the resource group within the
47
+ # Azure subscription.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_with_http_info(resource_group_name, custom_headers:nil)
54
+ list_async(resource_group_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # List Media Services accounts
59
+ #
60
+ # List Media Services accounts in the resource group
61
+ #
62
+ # @param resource_group_name [String] The name of the resource group within the
63
+ # Azure subscription.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_async(resource_group_name, custom_headers:nil)
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
72
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
73
+
74
+
75
+ request_headers = {}
76
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
77
+
78
+ # Set Headers
79
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
80
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
81
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices'
82
+
83
+ request_url = @base_url || @client.base_url
84
+
85
+ options = {
86
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
88
+ query_params: {'api-version' => @client.api_version},
89
+ headers: request_headers.merge(custom_headers || {}),
90
+ base_url: request_url
91
+ }
92
+ promise = @client.make_request_async(:get, path_template, options)
93
+
94
+ promise = promise.then do |result|
95
+ http_response = result.response
96
+ status_code = http_response.status
97
+ response_content = http_response.body
98
+ unless status_code == 200
99
+ error_model = JSON.load(response_content)
100
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
101
+ end
102
+
103
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
104
+ # Deserialize Response
105
+ if status_code == 200
106
+ begin
107
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
108
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::MediaServiceCollection.mapper()
109
+ result.body = @client.deserialize(result_mapper, parsed_response)
110
+ rescue Exception => e
111
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
112
+ end
113
+ end
114
+
115
+ result
116
+ end
117
+
118
+ promise.execute
119
+ end
120
+
121
+ #
122
+ # Get a Media Services account
123
+ #
124
+ # Get the details of a Media Services account
125
+ #
126
+ # @param resource_group_name [String] The name of the resource group within the
127
+ # Azure subscription.
128
+ # @param account_name [String] The Media Services account name.
129
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
130
+ # will be added to the HTTP request.
131
+ #
132
+ # @return [MediaService] operation results.
133
+ #
134
+ def get(resource_group_name, account_name, custom_headers:nil)
135
+ response = get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
136
+ response.body unless response.nil?
137
+ end
138
+
139
+ #
140
+ # Get a Media Services account
141
+ #
142
+ # Get the details of a Media Services account
143
+ #
144
+ # @param resource_group_name [String] The name of the resource group within the
145
+ # Azure subscription.
146
+ # @param account_name [String] The Media Services account name.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
151
+ #
152
+ def get_with_http_info(resource_group_name, account_name, custom_headers:nil)
153
+ get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
154
+ end
155
+
156
+ #
157
+ # Get a Media Services account
158
+ #
159
+ # Get the details of a Media Services account
160
+ #
161
+ # @param resource_group_name [String] The name of the resource group within the
162
+ # Azure subscription.
163
+ # @param account_name [String] The Media Services account name.
164
+ # @param [Hash{String => String}] A hash of custom headers that will be added
165
+ # to the HTTP request.
166
+ #
167
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
168
+ #
169
+ def get_async(resource_group_name, account_name, custom_headers:nil)
170
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
171
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
172
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
173
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
174
+
175
+
176
+ request_headers = {}
177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
178
+
179
+ # Set Headers
180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
182
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}'
183
+
184
+ request_url = @base_url || @client.base_url
185
+
186
+ options = {
187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
189
+ query_params: {'api-version' => @client.api_version},
190
+ headers: request_headers.merge(custom_headers || {}),
191
+ base_url: request_url
192
+ }
193
+ promise = @client.make_request_async(:get, path_template, options)
194
+
195
+ promise = promise.then do |result|
196
+ http_response = result.response
197
+ status_code = http_response.status
198
+ response_content = http_response.body
199
+ unless status_code == 200
200
+ error_model = JSON.load(response_content)
201
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
202
+ end
203
+
204
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
205
+ # Deserialize Response
206
+ if status_code == 200
207
+ begin
208
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
209
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::MediaService.mapper()
210
+ result.body = @client.deserialize(result_mapper, parsed_response)
211
+ rescue Exception => e
212
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
213
+ end
214
+ end
215
+
216
+ result
217
+ end
218
+
219
+ promise.execute
220
+ end
221
+
222
+ #
223
+ # Create or update a Media Services account
224
+ #
225
+ # Creates or updates a Media Services account
226
+ #
227
+ # @param resource_group_name [String] The name of the resource group within the
228
+ # Azure subscription.
229
+ # @param account_name [String] The Media Services account name.
230
+ # @param parameters [MediaService] The request parameters
231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
+ # will be added to the HTTP request.
233
+ #
234
+ # @return [MediaService] operation results.
235
+ #
236
+ def create_or_update(resource_group_name, account_name, parameters, custom_headers:nil)
237
+ response = create_or_update_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
238
+ response.body unless response.nil?
239
+ end
240
+
241
+ #
242
+ # Create or update a Media Services account
243
+ #
244
+ # Creates or updates a Media Services account
245
+ #
246
+ # @param resource_group_name [String] The name of the resource group within the
247
+ # Azure subscription.
248
+ # @param account_name [String] The Media Services account name.
249
+ # @param parameters [MediaService] The request parameters
250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
+ # will be added to the HTTP request.
252
+ #
253
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
254
+ #
255
+ def create_or_update_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
256
+ create_or_update_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
257
+ end
258
+
259
+ #
260
+ # Create or update a Media Services account
261
+ #
262
+ # Creates or updates a Media Services account
263
+ #
264
+ # @param resource_group_name [String] The name of the resource group within the
265
+ # Azure subscription.
266
+ # @param account_name [String] The Media Services account name.
267
+ # @param parameters [MediaService] The request parameters
268
+ # @param [Hash{String => String}] A hash of custom headers that will be added
269
+ # to the HTTP request.
270
+ #
271
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
272
+ #
273
+ def create_or_update_async(resource_group_name, account_name, parameters, custom_headers:nil)
274
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
275
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
276
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
277
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
278
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
279
+
280
+
281
+ request_headers = {}
282
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
283
+
284
+ # Set Headers
285
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
286
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
287
+
288
+ # Serialize Request
289
+ request_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::MediaService.mapper()
290
+ request_content = @client.serialize(request_mapper, parameters)
291
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
292
+
293
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}'
294
+
295
+ request_url = @base_url || @client.base_url
296
+
297
+ options = {
298
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
299
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
300
+ query_params: {'api-version' => @client.api_version},
301
+ body: request_content,
302
+ headers: request_headers.merge(custom_headers || {}),
303
+ base_url: request_url
304
+ }
305
+ promise = @client.make_request_async(:put, path_template, options)
306
+
307
+ promise = promise.then do |result|
308
+ http_response = result.response
309
+ status_code = http_response.status
310
+ response_content = http_response.body
311
+ unless status_code == 200 || status_code == 201
312
+ error_model = JSON.load(response_content)
313
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
314
+ end
315
+
316
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
317
+ # Deserialize Response
318
+ if status_code == 200
319
+ begin
320
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
321
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::MediaService.mapper()
322
+ result.body = @client.deserialize(result_mapper, parsed_response)
323
+ rescue Exception => e
324
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
325
+ end
326
+ end
327
+ # Deserialize Response
328
+ if status_code == 201
329
+ begin
330
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
331
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::MediaService.mapper()
332
+ result.body = @client.deserialize(result_mapper, parsed_response)
333
+ rescue Exception => e
334
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
335
+ end
336
+ end
337
+
338
+ result
339
+ end
340
+
341
+ promise.execute
342
+ end
343
+
344
+ #
345
+ # Delete a Media Services account.
346
+ #
347
+ # Deletes a Media Services account
348
+ #
349
+ # @param resource_group_name [String] The name of the resource group within the
350
+ # Azure subscription.
351
+ # @param account_name [String] The Media Services account name.
352
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
353
+ # will be added to the HTTP request.
354
+ #
355
+ #
356
+ def delete(resource_group_name, account_name, custom_headers:nil)
357
+ response = delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
358
+ nil
359
+ end
360
+
361
+ #
362
+ # Delete a Media Services account.
363
+ #
364
+ # Deletes a Media Services account
365
+ #
366
+ # @param resource_group_name [String] The name of the resource group within the
367
+ # Azure subscription.
368
+ # @param account_name [String] The Media Services account name.
369
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
370
+ # will be added to the HTTP request.
371
+ #
372
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
373
+ #
374
+ def delete_with_http_info(resource_group_name, account_name, custom_headers:nil)
375
+ delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
376
+ end
377
+
378
+ #
379
+ # Delete a Media Services account.
380
+ #
381
+ # Deletes a Media Services account
382
+ #
383
+ # @param resource_group_name [String] The name of the resource group within the
384
+ # Azure subscription.
385
+ # @param account_name [String] The Media Services account name.
386
+ # @param [Hash{String => String}] A hash of custom headers that will be added
387
+ # to the HTTP request.
388
+ #
389
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
390
+ #
391
+ def delete_async(resource_group_name, account_name, custom_headers:nil)
392
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
393
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
394
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
395
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
396
+
397
+
398
+ request_headers = {}
399
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
400
+
401
+ # Set Headers
402
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
403
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
404
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}'
405
+
406
+ request_url = @base_url || @client.base_url
407
+
408
+ options = {
409
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
410
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
411
+ query_params: {'api-version' => @client.api_version},
412
+ headers: request_headers.merge(custom_headers || {}),
413
+ base_url: request_url
414
+ }
415
+ promise = @client.make_request_async(:delete, path_template, options)
416
+
417
+ promise = promise.then do |result|
418
+ http_response = result.response
419
+ status_code = http_response.status
420
+ response_content = http_response.body
421
+ unless status_code == 200
422
+ error_model = JSON.load(response_content)
423
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
424
+ end
425
+
426
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
427
+
428
+ result
429
+ end
430
+
431
+ promise.execute
432
+ end
433
+
434
+ #
435
+ # Update a Media Services account
436
+ #
437
+ # Updates an existing Media Services account
438
+ #
439
+ # @param resource_group_name [String] The name of the resource group within the
440
+ # Azure subscription.
441
+ # @param account_name [String] The Media Services account name.
442
+ # @param parameters [MediaService] The request parameters
443
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
444
+ # will be added to the HTTP request.
445
+ #
446
+ # @return [MediaService] operation results.
447
+ #
448
+ def update(resource_group_name, account_name, parameters, custom_headers:nil)
449
+ response = update_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
450
+ response.body unless response.nil?
451
+ end
452
+
453
+ #
454
+ # Update a Media Services account
455
+ #
456
+ # Updates an existing Media Services account
457
+ #
458
+ # @param resource_group_name [String] The name of the resource group within the
459
+ # Azure subscription.
460
+ # @param account_name [String] The Media Services account name.
461
+ # @param parameters [MediaService] The request parameters
462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
463
+ # will be added to the HTTP request.
464
+ #
465
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
466
+ #
467
+ def update_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
468
+ update_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
469
+ end
470
+
471
+ #
472
+ # Update a Media Services account
473
+ #
474
+ # Updates an existing Media Services account
475
+ #
476
+ # @param resource_group_name [String] The name of the resource group within the
477
+ # Azure subscription.
478
+ # @param account_name [String] The Media Services account name.
479
+ # @param parameters [MediaService] The request parameters
480
+ # @param [Hash{String => String}] A hash of custom headers that will be added
481
+ # to the HTTP request.
482
+ #
483
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
484
+ #
485
+ def update_async(resource_group_name, account_name, parameters, custom_headers:nil)
486
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
487
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
488
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
489
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
490
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
491
+
492
+
493
+ request_headers = {}
494
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
495
+
496
+ # Set Headers
497
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
498
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
499
+
500
+ # Serialize Request
501
+ request_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::MediaService.mapper()
502
+ request_content = @client.serialize(request_mapper, parameters)
503
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
504
+
505
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}'
506
+
507
+ request_url = @base_url || @client.base_url
508
+
509
+ options = {
510
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
511
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
512
+ query_params: {'api-version' => @client.api_version},
513
+ body: request_content,
514
+ headers: request_headers.merge(custom_headers || {}),
515
+ base_url: request_url
516
+ }
517
+ promise = @client.make_request_async(:patch, path_template, options)
518
+
519
+ promise = promise.then do |result|
520
+ http_response = result.response
521
+ status_code = http_response.status
522
+ response_content = http_response.body
523
+ unless status_code == 200
524
+ error_model = JSON.load(response_content)
525
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
526
+ end
527
+
528
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
529
+ # Deserialize Response
530
+ if status_code == 200
531
+ begin
532
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
533
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::MediaService.mapper()
534
+ result.body = @client.deserialize(result_mapper, parsed_response)
535
+ rescue Exception => e
536
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
537
+ end
538
+ end
539
+
540
+ result
541
+ end
542
+
543
+ promise.execute
544
+ end
545
+
546
+ #
547
+ # Synchronizes Storage Account Keys
548
+ #
549
+ # Synchronizes storage account keys for a storage account associated with the
550
+ # Media Service account.
551
+ #
552
+ # @param resource_group_name [String] The name of the resource group within the
553
+ # Azure subscription.
554
+ # @param account_name [String] The Media Services account name.
555
+ # @param parameters [SyncStorageKeysInput] The request parameters
556
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
557
+ # will be added to the HTTP request.
558
+ #
559
+ #
560
+ def sync_storage_keys(resource_group_name, account_name, parameters, custom_headers:nil)
561
+ response = sync_storage_keys_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
562
+ nil
563
+ end
564
+
565
+ #
566
+ # Synchronizes Storage Account Keys
567
+ #
568
+ # Synchronizes storage account keys for a storage account associated with the
569
+ # Media Service account.
570
+ #
571
+ # @param resource_group_name [String] The name of the resource group within the
572
+ # Azure subscription.
573
+ # @param account_name [String] The Media Services account name.
574
+ # @param parameters [SyncStorageKeysInput] The request parameters
575
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
576
+ # will be added to the HTTP request.
577
+ #
578
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
579
+ #
580
+ def sync_storage_keys_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
581
+ sync_storage_keys_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
582
+ end
583
+
584
+ #
585
+ # Synchronizes Storage Account Keys
586
+ #
587
+ # Synchronizes storage account keys for a storage account associated with the
588
+ # Media Service account.
589
+ #
590
+ # @param resource_group_name [String] The name of the resource group within the
591
+ # Azure subscription.
592
+ # @param account_name [String] The Media Services account name.
593
+ # @param parameters [SyncStorageKeysInput] The request parameters
594
+ # @param [Hash{String => String}] A hash of custom headers that will be added
595
+ # to the HTTP request.
596
+ #
597
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
598
+ #
599
+ def sync_storage_keys_async(resource_group_name, account_name, parameters, custom_headers:nil)
600
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
601
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
602
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
603
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
604
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
605
+
606
+
607
+ request_headers = {}
608
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
609
+
610
+ # Set Headers
611
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
612
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
613
+
614
+ # Serialize Request
615
+ request_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::SyncStorageKeysInput.mapper()
616
+ request_content = @client.serialize(request_mapper, parameters)
617
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
618
+
619
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/syncStorageKeys'
620
+
621
+ request_url = @base_url || @client.base_url
622
+
623
+ options = {
624
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
625
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
626
+ query_params: {'api-version' => @client.api_version},
627
+ body: request_content,
628
+ headers: request_headers.merge(custom_headers || {}),
629
+ base_url: request_url
630
+ }
631
+ promise = @client.make_request_async(:post, path_template, options)
632
+
633
+ promise = promise.then do |result|
634
+ http_response = result.response
635
+ status_code = http_response.status
636
+ response_content = http_response.body
637
+ unless status_code == 200
638
+ error_model = JSON.load(response_content)
639
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
640
+ end
641
+
642
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
643
+
644
+ result
645
+ end
646
+
647
+ promise.execute
648
+ end
649
+
650
+ #
651
+ # List Media Services accounts
652
+ #
653
+ # List Media Services accounts in the subscription.
654
+ #
655
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
656
+ # will be added to the HTTP request.
657
+ #
658
+ # @return [Array<SubscriptionMediaService>] operation results.
659
+ #
660
+ def list_by_subscription(custom_headers:nil)
661
+ first_page = list_by_subscription_as_lazy(custom_headers:custom_headers)
662
+ first_page.get_all_items
663
+ end
664
+
665
+ #
666
+ # List Media Services accounts
667
+ #
668
+ # List Media Services accounts in the subscription.
669
+ #
670
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
671
+ # will be added to the HTTP request.
672
+ #
673
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
674
+ #
675
+ def list_by_subscription_with_http_info(custom_headers:nil)
676
+ list_by_subscription_async(custom_headers:custom_headers).value!
677
+ end
678
+
679
+ #
680
+ # List Media Services accounts
681
+ #
682
+ # List Media Services accounts in the subscription.
683
+ #
684
+ # @param [Hash{String => String}] A hash of custom headers that will be added
685
+ # to the HTTP request.
686
+ #
687
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
688
+ #
689
+ def list_by_subscription_async(custom_headers:nil)
690
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
691
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
692
+
693
+
694
+ request_headers = {}
695
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
696
+
697
+ # Set Headers
698
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
699
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
700
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices'
701
+
702
+ request_url = @base_url || @client.base_url
703
+
704
+ options = {
705
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
706
+ path_params: {'subscriptionId' => @client.subscription_id},
707
+ query_params: {'api-version' => @client.api_version},
708
+ headers: request_headers.merge(custom_headers || {}),
709
+ base_url: request_url
710
+ }
711
+ promise = @client.make_request_async(:get, path_template, options)
712
+
713
+ promise = promise.then do |result|
714
+ http_response = result.response
715
+ status_code = http_response.status
716
+ response_content = http_response.body
717
+ unless status_code == 200
718
+ error_model = JSON.load(response_content)
719
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
720
+ end
721
+
722
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
723
+ # Deserialize Response
724
+ if status_code == 200
725
+ begin
726
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
727
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::SubscriptionMediaServiceCollection.mapper()
728
+ result.body = @client.deserialize(result_mapper, parsed_response)
729
+ rescue Exception => e
730
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
731
+ end
732
+ end
733
+
734
+ result
735
+ end
736
+
737
+ promise.execute
738
+ end
739
+
740
+ #
741
+ # Get a Media Services account
742
+ #
743
+ # Get the details of a Media Services account
744
+ #
745
+ # @param account_name [String] The Media Services account name.
746
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
747
+ # will be added to the HTTP request.
748
+ #
749
+ # @return [SubscriptionMediaService] operation results.
750
+ #
751
+ def get_by_subscription(account_name, custom_headers:nil)
752
+ response = get_by_subscription_async(account_name, custom_headers:custom_headers).value!
753
+ response.body unless response.nil?
754
+ end
755
+
756
+ #
757
+ # Get a Media Services account
758
+ #
759
+ # Get the details of a Media Services account
760
+ #
761
+ # @param account_name [String] The Media Services account name.
762
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
763
+ # will be added to the HTTP request.
764
+ #
765
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
766
+ #
767
+ def get_by_subscription_with_http_info(account_name, custom_headers:nil)
768
+ get_by_subscription_async(account_name, custom_headers:custom_headers).value!
769
+ end
770
+
771
+ #
772
+ # Get a Media Services account
773
+ #
774
+ # Get the details of a Media Services account
775
+ #
776
+ # @param account_name [String] The Media Services account name.
777
+ # @param [Hash{String => String}] A hash of custom headers that will be added
778
+ # to the HTTP request.
779
+ #
780
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
781
+ #
782
+ def get_by_subscription_async(account_name, custom_headers:nil)
783
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
784
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
785
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
786
+
787
+
788
+ request_headers = {}
789
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
790
+
791
+ # Set Headers
792
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
793
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
794
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices/{accountName}'
795
+
796
+ request_url = @base_url || @client.base_url
797
+
798
+ options = {
799
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
800
+ path_params: {'subscriptionId' => @client.subscription_id,'accountName' => account_name},
801
+ query_params: {'api-version' => @client.api_version},
802
+ headers: request_headers.merge(custom_headers || {}),
803
+ base_url: request_url
804
+ }
805
+ promise = @client.make_request_async(:get, path_template, options)
806
+
807
+ promise = promise.then do |result|
808
+ http_response = result.response
809
+ status_code = http_response.status
810
+ response_content = http_response.body
811
+ unless status_code == 200
812
+ error_model = JSON.load(response_content)
813
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
814
+ end
815
+
816
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
817
+ # Deserialize Response
818
+ if status_code == 200
819
+ begin
820
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
821
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::SubscriptionMediaService.mapper()
822
+ result.body = @client.deserialize(result_mapper, parsed_response)
823
+ rescue Exception => e
824
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
825
+ end
826
+ end
827
+
828
+ result
829
+ end
830
+
831
+ promise.execute
832
+ end
833
+
834
+ #
835
+ # List Media Services accounts
836
+ #
837
+ # List Media Services accounts in the resource group
838
+ #
839
+ # @param next_page_link [String] The NextLink from the previous successful call
840
+ # to List operation.
841
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
842
+ # will be added to the HTTP request.
843
+ #
844
+ # @return [MediaServiceCollection] operation results.
845
+ #
846
+ def list_next(next_page_link, custom_headers:nil)
847
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
848
+ response.body unless response.nil?
849
+ end
850
+
851
+ #
852
+ # List Media Services accounts
853
+ #
854
+ # List Media Services accounts in the resource group
855
+ #
856
+ # @param next_page_link [String] The NextLink from the previous successful call
857
+ # to List operation.
858
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
859
+ # will be added to the HTTP request.
860
+ #
861
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
862
+ #
863
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
864
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
865
+ end
866
+
867
+ #
868
+ # List Media Services accounts
869
+ #
870
+ # List Media Services accounts in the resource group
871
+ #
872
+ # @param next_page_link [String] The NextLink from the previous successful call
873
+ # to List operation.
874
+ # @param [Hash{String => String}] A hash of custom headers that will be added
875
+ # to the HTTP request.
876
+ #
877
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
878
+ #
879
+ def list_next_async(next_page_link, custom_headers:nil)
880
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
881
+
882
+
883
+ request_headers = {}
884
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
885
+
886
+ # Set Headers
887
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
888
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
889
+ path_template = '{nextLink}'
890
+
891
+ request_url = @base_url || @client.base_url
892
+
893
+ options = {
894
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
895
+ skip_encoding_path_params: {'nextLink' => next_page_link},
896
+ headers: request_headers.merge(custom_headers || {}),
897
+ base_url: request_url
898
+ }
899
+ promise = @client.make_request_async(:get, path_template, options)
900
+
901
+ promise = promise.then do |result|
902
+ http_response = result.response
903
+ status_code = http_response.status
904
+ response_content = http_response.body
905
+ unless status_code == 200
906
+ error_model = JSON.load(response_content)
907
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
908
+ end
909
+
910
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
911
+ # Deserialize Response
912
+ if status_code == 200
913
+ begin
914
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
915
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::MediaServiceCollection.mapper()
916
+ result.body = @client.deserialize(result_mapper, parsed_response)
917
+ rescue Exception => e
918
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
919
+ end
920
+ end
921
+
922
+ result
923
+ end
924
+
925
+ promise.execute
926
+ end
927
+
928
+ #
929
+ # List Media Services accounts
930
+ #
931
+ # List Media Services accounts in the subscription.
932
+ #
933
+ # @param next_page_link [String] The NextLink from the previous successful call
934
+ # to List operation.
935
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
936
+ # will be added to the HTTP request.
937
+ #
938
+ # @return [SubscriptionMediaServiceCollection] operation results.
939
+ #
940
+ def list_by_subscription_next(next_page_link, custom_headers:nil)
941
+ response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
942
+ response.body unless response.nil?
943
+ end
944
+
945
+ #
946
+ # List Media Services accounts
947
+ #
948
+ # List Media Services accounts in the subscription.
949
+ #
950
+ # @param next_page_link [String] The NextLink from the previous successful call
951
+ # to List operation.
952
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
953
+ # will be added to the HTTP request.
954
+ #
955
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
956
+ #
957
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
958
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
959
+ end
960
+
961
+ #
962
+ # List Media Services accounts
963
+ #
964
+ # List Media Services accounts in the subscription.
965
+ #
966
+ # @param next_page_link [String] The NextLink from the previous successful call
967
+ # to List operation.
968
+ # @param [Hash{String => String}] A hash of custom headers that will be added
969
+ # to the HTTP request.
970
+ #
971
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
972
+ #
973
+ def list_by_subscription_next_async(next_page_link, custom_headers:nil)
974
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
975
+
976
+
977
+ request_headers = {}
978
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
979
+
980
+ # Set Headers
981
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
982
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
983
+ path_template = '{nextLink}'
984
+
985
+ request_url = @base_url || @client.base_url
986
+
987
+ options = {
988
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
989
+ skip_encoding_path_params: {'nextLink' => next_page_link},
990
+ headers: request_headers.merge(custom_headers || {}),
991
+ base_url: request_url
992
+ }
993
+ promise = @client.make_request_async(:get, path_template, options)
994
+
995
+ promise = promise.then do |result|
996
+ http_response = result.response
997
+ status_code = http_response.status
998
+ response_content = http_response.body
999
+ unless status_code == 200
1000
+ error_model = JSON.load(response_content)
1001
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1002
+ end
1003
+
1004
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1005
+ # Deserialize Response
1006
+ if status_code == 200
1007
+ begin
1008
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1009
+ result_mapper = Azure::MediaServices::Mgmt::V2018_03_30_preview::Models::SubscriptionMediaServiceCollection.mapper()
1010
+ result.body = @client.deserialize(result_mapper, parsed_response)
1011
+ rescue Exception => e
1012
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1013
+ end
1014
+ end
1015
+
1016
+ result
1017
+ end
1018
+
1019
+ promise.execute
1020
+ end
1021
+
1022
+ #
1023
+ # List Media Services accounts
1024
+ #
1025
+ # List Media Services accounts in the resource group
1026
+ #
1027
+ # @param resource_group_name [String] The name of the resource group within the
1028
+ # Azure subscription.
1029
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1030
+ # will be added to the HTTP request.
1031
+ #
1032
+ # @return [MediaServiceCollection] which provide lazy access to pages of the
1033
+ # response.
1034
+ #
1035
+ def list_as_lazy(resource_group_name, custom_headers:nil)
1036
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
1037
+ unless response.nil?
1038
+ page = response.body
1039
+ page.next_method = Proc.new do |next_page_link|
1040
+ list_next_async(next_page_link, custom_headers:custom_headers)
1041
+ end
1042
+ page
1043
+ end
1044
+ end
1045
+
1046
+ #
1047
+ # List Media Services accounts
1048
+ #
1049
+ # List Media Services accounts in the subscription.
1050
+ #
1051
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1052
+ # will be added to the HTTP request.
1053
+ #
1054
+ # @return [SubscriptionMediaServiceCollection] which provide lazy access to
1055
+ # pages of the response.
1056
+ #
1057
+ def list_by_subscription_as_lazy(custom_headers:nil)
1058
+ response = list_by_subscription_async(custom_headers:custom_headers).value!
1059
+ unless response.nil?
1060
+ page = response.body
1061
+ page.next_method = Proc.new do |next_page_link|
1062
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
1063
+ end
1064
+ page
1065
+ end
1066
+ end
1067
+
1068
+ end
1069
+ end