azure_mgmt_media_services 0.20.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) 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/azure_media_services.rb +1 -1
  4. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/azure_media_services.rb +1 -1
  5. data/lib/2018-07-01/generated/azure_mgmt_media_services/azure_media_services.rb +1 -1
  6. data/lib/2019-05-01-preview/generated/azure_mgmt_media_services/azure_media_services.rb +1 -1
  7. data/lib/2020-05-01/generated/azure_mgmt_media_services.rb +266 -0
  8. data/lib/2020-05-01/generated/azure_mgmt_media_services/account_filters.rb +698 -0
  9. data/lib/2020-05-01/generated/azure_mgmt_media_services/asset_filters.rb +719 -0
  10. data/lib/2020-05-01/generated/azure_mgmt_media_services/assets.rb +1069 -0
  11. data/lib/2020-05-01/generated/azure_mgmt_media_services/azure_media_services.rb +193 -0
  12. data/lib/2020-05-01/generated/azure_mgmt_media_services/content_key_policies.rb +829 -0
  13. data/lib/2020-05-01/generated/azure_mgmt_media_services/jobs.rb +826 -0
  14. data/lib/2020-05-01/generated/azure_mgmt_media_services/live_events.rb +1509 -0
  15. data/lib/2020-05-01/generated/azure_mgmt_media_services/live_outputs.rb +737 -0
  16. data/lib/2020-05-01/generated/azure_mgmt_media_services/locations.rb +132 -0
  17. data/lib/2020-05-01/generated/azure_mgmt_media_services/mediaservices.rb +1203 -0
  18. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/aac_audio.rb +94 -0
  19. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/aac_audio_profile.rb +17 -0
  20. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/absolute_clip_time.rb +65 -0
  21. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/account_encryption.rb +61 -0
  22. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/account_encryption_key_type.rb +16 -0
  23. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/account_filter.rb +106 -0
  24. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/account_filter_collection.rb +99 -0
  25. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/akamai_access_control.rb +56 -0
  26. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/akamai_signature_header_authentication_key.rb +68 -0
  27. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/analysis_resolution.rb +16 -0
  28. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/api_error.rb +47 -0
  29. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset.rb +156 -0
  30. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_collection.rb +99 -0
  31. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_container_permission.rb +17 -0
  32. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_container_sas.rb +54 -0
  33. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_file_encryption_metadata.rb +68 -0
  34. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_filter.rb +106 -0
  35. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_filter_collection.rb +99 -0
  36. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_storage_encryption_format.rb +16 -0
  37. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_streaming_locator.rb +133 -0
  38. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/audio.rb +92 -0
  39. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/audio_analysis_mode.rb +16 -0
  40. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/audio_analyzer_preset.rb +110 -0
  41. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/audio_overlay.rb +98 -0
  42. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/azure_entity_resource.rb +75 -0
  43. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/built_in_standard_encoder_preset.rb +68 -0
  44. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/cbcs_drm_configuration.rb +73 -0
  45. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/cenc_drm_configuration.rb +61 -0
  46. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/check_name_availability_input.rb +58 -0
  47. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/clip_time.rb +48 -0
  48. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/codec.rb +66 -0
  49. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/common_encryption_cbcs.rb +95 -0
  50. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/common_encryption_cenc.rb +95 -0
  51. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy.rb +129 -0
  52. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_clear_key_configuration.rb +50 -0
  53. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_collection.rb +100 -0
  54. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_configuration.rb +51 -0
  55. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_configuration.rb +124 -0
  56. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_offline_rental_configuration.rb +59 -0
  57. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_rental_and_lease_key_type.rb +19 -0
  58. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_open_restriction.rb +51 -0
  59. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_option.rb +87 -0
  60. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_configuration.rb +82 -0
  61. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_encryption_key_from_header.rb +51 -0
  62. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_encryption_key_from_key_identifier.rb +64 -0
  63. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_key_location.rb +49 -0
  64. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_type.rb +18 -0
  65. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_explicit_analog_television_restriction.rb +61 -0
  66. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_license.rb +154 -0
  67. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_license_type.rb +17 -0
  68. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_play_right.rb +195 -0
  69. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_unknown_output_passing_option.rb +18 -0
  70. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_properties.rb +102 -0
  71. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_restriction.rb +49 -0
  72. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_restriction_token_key.rb +49 -0
  73. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_restriction_token_type.rb +17 -0
  74. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_rsa_token_key.rb +72 -0
  75. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_symmetric_token_key.rb +61 -0
  76. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_token_claim.rb +57 -0
  77. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_token_restriction.rb +155 -0
  78. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_unknown_configuration.rb +51 -0
  79. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_unknown_restriction.rb +51 -0
  80. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_widevine_configuration.rb +61 -0
  81. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_x509certificate_token_key.rb +62 -0
  82. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/copy_audio.rb +58 -0
  83. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/copy_video.rb +59 -0
  84. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/cross_site_access_policies.rb +58 -0
  85. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/default_key.rb +59 -0
  86. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/deinterlace.rb +60 -0
  87. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/deinterlace_mode.rb +16 -0
  88. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/deinterlace_parity.rb +17 -0
  89. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/edge_policies.rb +48 -0
  90. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/edge_usage_data_collection_policy.rb +85 -0
  91. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/edge_usage_data_event_hub.rb +70 -0
  92. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/enabled_protocols.rb +79 -0
  93. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/encoder_named_preset.rb +25 -0
  94. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/encryption_scheme.rb +18 -0
  95. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/entity_name_availability_check_output.rb +69 -0
  96. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/entropy_mode.rb +16 -0
  97. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/envelope_encryption.rb +100 -0
  98. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/face_detector_preset.rb +95 -0
  99. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filter_track_property_compare_operation.rb +16 -0
  100. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filter_track_property_condition.rb +71 -0
  101. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filter_track_property_type.rb +20 -0
  102. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filter_track_selection.rb +56 -0
  103. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filters.rb +97 -0
  104. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/first_quality.rb +46 -0
  105. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/format.rb +74 -0
  106. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/h264complexity.rb +17 -0
  107. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/h264layer.rb +189 -0
  108. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/h264video.rb +130 -0
  109. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/h264video_profile.rb +20 -0
  110. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/hls.rb +48 -0
  111. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/image.rb +145 -0
  112. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/image_format.rb +58 -0
  113. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/insights_type.rb +17 -0
  114. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/ipaccess_control.rb +55 -0
  115. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/iprange.rb +68 -0
  116. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job.rb +210 -0
  117. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_collection.rb +99 -0
  118. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_error.rb +114 -0
  119. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_error_category.rb +19 -0
  120. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_error_code.rb +23 -0
  121. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_error_detail.rb +59 -0
  122. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_input.rb +49 -0
  123. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_input_asset.rb +107 -0
  124. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_input_clip.rb +117 -0
  125. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_input_http.rb +110 -0
  126. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_inputs.rb +72 -0
  127. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_output.rb +138 -0
  128. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_output_asset.rb +115 -0
  129. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_retry.rb +16 -0
  130. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_state.rb +21 -0
  131. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/jpg_format.rb +58 -0
  132. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/jpg_image.rb +144 -0
  133. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/jpg_layer.rb +86 -0
  134. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/key_vault_properties.rb +63 -0
  135. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/layer.rb +93 -0
  136. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_container_sas_input.rb +59 -0
  137. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_content_keys_response.rb +56 -0
  138. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_edge_policies_input.rb +47 -0
  139. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_paths_response.rb +76 -0
  140. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_streaming_locators_response.rb +56 -0
  141. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event.rb +274 -0
  142. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_action_input.rb +48 -0
  143. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_encoding.rb +99 -0
  144. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_encoding_type.rb +17 -0
  145. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_endpoint.rb +57 -0
  146. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_input.rb +109 -0
  147. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_input_access_control.rb +47 -0
  148. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_input_protocol.rb +16 -0
  149. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_input_track_selection.rb +72 -0
  150. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_list_result.rb +110 -0
  151. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_output_transcription_track.rb +49 -0
  152. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_preview.rb +113 -0
  153. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_preview_access_control.rb +47 -0
  154. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_resource_state.rb +21 -0
  155. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_transcription.rb +91 -0
  156. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_output.rb +185 -0
  157. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_output_list_result.rb +111 -0
  158. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_output_resource_state.rb +17 -0
  159. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/location.rb +47 -0
  160. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/log_specification.rb +71 -0
  161. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/managed_identity_type.rb +16 -0
  162. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/media_service.rb +155 -0
  163. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/media_service_collection.rb +99 -0
  164. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/media_service_identity.rb +72 -0
  165. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/metric_aggregation_type.rb +17 -0
  166. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/metric_dimension.rb +71 -0
  167. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/metric_specification.rb +137 -0
  168. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/metric_unit.rb +17 -0
  169. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/mp4format.rb +75 -0
  170. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/multi_bitrate_format.rb +84 -0
  171. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/no_encryption.rb +47 -0
  172. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/odata_error.rb +89 -0
  173. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/on_error_type.rb +16 -0
  174. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/operation.rb +81 -0
  175. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/operation_collection.rb +99 -0
  176. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/operation_display.rb +79 -0
  177. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/output_file.rb +59 -0
  178. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/overlay.rb +133 -0
  179. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/png_format.rb +58 -0
  180. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/png_image.rb +128 -0
  181. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/png_layer.rb +74 -0
  182. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/presentation_time_range.rb +102 -0
  183. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/preset.rb +51 -0
  184. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/priority.rb +17 -0
  185. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint.rb +47 -0
  186. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint_connection.rb +101 -0
  187. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint_connection_list_result.rb +57 -0
  188. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint_connection_provisioning_state.rb +18 -0
  189. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint_service_connection_status.rb +17 -0
  190. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_link_resource.rb +115 -0
  191. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_link_resource_list_result.rb +55 -0
  192. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_link_service_connection_state.rb +72 -0
  193. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/properties.rb +48 -0
  194. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/provider.rb +46 -0
  195. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/proxy_resource.rb +63 -0
  196. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/rectangle.rb +88 -0
  197. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/resource.rb +83 -0
  198. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/rotation.rb +20 -0
  199. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/service_specification.rb +77 -0
  200. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/standard_encoder_preset.rb +110 -0
  201. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/storage_account.rb +62 -0
  202. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/storage_account_type.rb +16 -0
  203. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/storage_authentication.rb +16 -0
  204. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/storage_encrypted_asset_decryption_data.rb +68 -0
  205. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/stream_options_flag.rb +16 -0
  206. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_endpoint.rb +285 -0
  207. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_endpoint_access_control.rb +60 -0
  208. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_endpoint_list_result.rb +111 -0
  209. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_endpoint_resource_state.rb +20 -0
  210. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_entity_scale_unit.rb +46 -0
  211. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_locator.rb +199 -0
  212. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_locator_collection.rb +100 -0
  213. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_locator_content_key.rb +116 -0
  214. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_locator_content_key_type.rb +17 -0
  215. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_path.rb +80 -0
  216. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy.rb +133 -0
  217. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_collection.rb +99 -0
  218. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_content_key.rb +78 -0
  219. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_content_keys.rb +68 -0
  220. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_fair_play_configuration.rb +64 -0
  221. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_play_ready_configuration.rb +64 -0
  222. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_streaming_protocol.rb +18 -0
  223. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_widevine_configuration.rb +53 -0
  224. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/stretch_mode.rb +17 -0
  225. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb +46 -0
  226. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/track_property_compare_operation.rb +16 -0
  227. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/track_property_condition.rb +70 -0
  228. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/track_property_type.rb +16 -0
  229. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/track_selection.rb +56 -0
  230. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/tracked_resource.rb +92 -0
  231. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/transform.rb +123 -0
  232. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/transform_collection.rb +99 -0
  233. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/transform_output.rb +82 -0
  234. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/transport_stream_format.rb +76 -0
  235. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/utc_clip_time.rb +64 -0
  236. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video.rb +98 -0
  237. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video_analyzer_preset.rb +103 -0
  238. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video_layer.rb +156 -0
  239. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video_overlay.rb +136 -0
  240. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video_sync_mode.rb +18 -0
  241. data/lib/2020-05-01/generated/azure_mgmt_media_services/module_definition.rb +9 -0
  242. data/lib/2020-05-01/generated/azure_mgmt_media_services/operations.rb +233 -0
  243. data/lib/2020-05-01/generated/azure_mgmt_media_services/private_endpoint_connections.rb +449 -0
  244. data/lib/2020-05-01/generated/azure_mgmt_media_services/private_link_resources.rb +235 -0
  245. data/lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb +1364 -0
  246. data/lib/2020-05-01/generated/azure_mgmt_media_services/streaming_locators.rb +808 -0
  247. data/lib/2020-05-01/generated/azure_mgmt_media_services/streaming_policies.rb +594 -0
  248. data/lib/2020-05-01/generated/azure_mgmt_media_services/transforms.rb +710 -0
  249. data/lib/azure_mgmt_media_services.rb +3 -2
  250. data/lib/profiles/latest/modules/mediaservices_profile_module.rb +594 -494
  251. data/lib/version.rb +1 -1
  252. metadata +245 -3
@@ -0,0 +1,1509 @@
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::V2020_05_01
7
+ #
8
+ # LiveEvents
9
+ #
10
+ class LiveEvents
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the LiveEvents 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 live events
26
+ #
27
+ # Lists all the live events in the account.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # Azure subscription.
31
+ # @param account_name [String] The Media Services account name.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<LiveEvent>] operation results.
36
+ #
37
+ def list(resource_group_name, account_name, custom_headers:nil)
38
+ first_page = list_as_lazy(resource_group_name, account_name, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # List live events
44
+ #
45
+ # Lists all the live events in the account.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group within the
48
+ # Azure subscription.
49
+ # @param account_name [String] The Media Services account name.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
56
+ list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # List live events
61
+ #
62
+ # Lists all the live events in the account.
63
+ #
64
+ # @param resource_group_name [String] The name of the resource group within the
65
+ # Azure subscription.
66
+ # @param account_name [String] The Media Services account name.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_async(resource_group_name, account_name, custom_headers:nil)
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
75
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
76
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
109
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEventListResult.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Get Live Event
129
+ #
130
+ # Gets properties of a live event.
131
+ #
132
+ # @param resource_group_name [String] The name of the resource group within the
133
+ # Azure subscription.
134
+ # @param account_name [String] The Media Services account name.
135
+ # @param live_event_name [String] The name of the live event, maximum length is
136
+ # 32.
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [LiveEvent] operation results.
141
+ #
142
+ def get(resource_group_name, account_name, live_event_name, custom_headers:nil)
143
+ response = get_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
144
+ response.body unless response.nil?
145
+ end
146
+
147
+ #
148
+ # Get Live Event
149
+ #
150
+ # Gets properties of a live event.
151
+ #
152
+ # @param resource_group_name [String] The name of the resource group within the
153
+ # Azure subscription.
154
+ # @param account_name [String] The Media Services account name.
155
+ # @param live_event_name [String] The name of the live event, maximum length is
156
+ # 32.
157
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
158
+ # will be added to the HTTP request.
159
+ #
160
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
161
+ #
162
+ def get_with_http_info(resource_group_name, account_name, live_event_name, custom_headers:nil)
163
+ get_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
164
+ end
165
+
166
+ #
167
+ # Get Live Event
168
+ #
169
+ # Gets properties of a live event.
170
+ #
171
+ # @param resource_group_name [String] The name of the resource group within the
172
+ # Azure subscription.
173
+ # @param account_name [String] The Media Services account name.
174
+ # @param live_event_name [String] The name of the live event, maximum length is
175
+ # 32.
176
+ # @param [Hash{String => String}] A hash of custom headers that will be added
177
+ # to the HTTP request.
178
+ #
179
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
180
+ #
181
+ def get_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
182
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
183
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
184
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
185
+ fail ArgumentError, 'live_event_name is nil' if live_event_name.nil?
186
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MaxLength': '32'" if !live_event_name.nil? && live_event_name.length > 32
187
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MinLength': '1'" if !live_event_name.nil? && live_event_name.length < 1
188
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !live_event_name.nil? && live_event_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
189
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
190
+
191
+
192
+ request_headers = {}
193
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
194
+
195
+ # Set Headers
196
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
197
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
198
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}'
199
+
200
+ request_url = @base_url || @client.base_url
201
+
202
+ options = {
203
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
204
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'liveEventName' => live_event_name},
205
+ query_params: {'api-version' => @client.api_version},
206
+ headers: request_headers.merge(custom_headers || {}),
207
+ base_url: request_url
208
+ }
209
+ promise = @client.make_request_async(:get, path_template, options)
210
+
211
+ promise = promise.then do |result|
212
+ http_response = result.response
213
+ status_code = http_response.status
214
+ response_content = http_response.body
215
+ unless status_code == 200 || status_code == 404
216
+ error_model = JSON.load(response_content)
217
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
218
+ end
219
+
220
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
221
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
222
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
223
+ # Deserialize Response
224
+ if status_code == 200
225
+ begin
226
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
227
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
228
+ result.body = @client.deserialize(result_mapper, parsed_response)
229
+ rescue Exception => e
230
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
231
+ end
232
+ end
233
+
234
+ result
235
+ end
236
+
237
+ promise.execute
238
+ end
239
+
240
+ #
241
+ # Create Live Event
242
+ #
243
+ # Creates a new live event.
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group within the
246
+ # Azure subscription.
247
+ # @param account_name [String] The Media Services account name.
248
+ # @param live_event_name [String] The name of the live event, maximum length is
249
+ # 32.
250
+ # @param parameters [LiveEvent] Live event properties needed for creation.
251
+ # @param auto_start [Boolean] The flag indicates if the resource should be
252
+ # automatically started on creation.
253
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
254
+ # will be added to the HTTP request.
255
+ #
256
+ # @return [LiveEvent] operation results.
257
+ #
258
+ def create(resource_group_name, account_name, live_event_name, parameters, auto_start:nil, custom_headers:nil)
259
+ response = create_async(resource_group_name, account_name, live_event_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value!
260
+ response.body unless response.nil?
261
+ end
262
+
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 live_event_name [String] The name of the live event, maximum length is
268
+ # 32.
269
+ # @param parameters [LiveEvent] Live event properties needed for creation.
270
+ # @param auto_start [Boolean] The flag indicates if the resource should be
271
+ # automatically started on creation.
272
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
273
+ # will be added to the HTTP request.
274
+ #
275
+ # @return [Concurrent::Promise] promise which provides async access to http
276
+ # response.
277
+ #
278
+ def create_async(resource_group_name, account_name, live_event_name, parameters, auto_start:nil, custom_headers:nil)
279
+ # Send request
280
+ promise = begin_create_async(resource_group_name, account_name, live_event_name, parameters, auto_start:auto_start, custom_headers:custom_headers)
281
+
282
+ promise = promise.then do |response|
283
+ # Defining deserialization method.
284
+ deserialize_method = lambda do |parsed_response|
285
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
286
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
287
+ end
288
+
289
+ # Waiting for response.
290
+ @client.get_long_running_operation_result(response, deserialize_method)
291
+ end
292
+
293
+ promise
294
+ end
295
+
296
+ #
297
+ # Updates settings on an existing live event.
298
+ #
299
+ # @param resource_group_name [String] The name of the resource group within the
300
+ # Azure subscription.
301
+ # @param account_name [String] The Media Services account name.
302
+ # @param live_event_name [String] The name of the live event, maximum length is
303
+ # 32.
304
+ # @param parameters [LiveEvent] Live event properties needed for patch.
305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
306
+ # will be added to the HTTP request.
307
+ #
308
+ # @return [LiveEvent] operation results.
309
+ #
310
+ def update(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
311
+ response = update_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
312
+ response.body unless response.nil?
313
+ end
314
+
315
+ #
316
+ # @param resource_group_name [String] The name of the resource group within the
317
+ # Azure subscription.
318
+ # @param account_name [String] The Media Services account name.
319
+ # @param live_event_name [String] The name of the live event, maximum length is
320
+ # 32.
321
+ # @param parameters [LiveEvent] Live event properties needed for patch.
322
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
323
+ # will be added to the HTTP request.
324
+ #
325
+ # @return [Concurrent::Promise] promise which provides async access to http
326
+ # response.
327
+ #
328
+ def update_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
329
+ # Send request
330
+ promise = begin_update_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers)
331
+
332
+ promise = promise.then do |response|
333
+ # Defining deserialization method.
334
+ deserialize_method = lambda do |parsed_response|
335
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
336
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
337
+ end
338
+
339
+ # Waiting for response.
340
+ @client.get_long_running_operation_result(response, deserialize_method)
341
+ end
342
+
343
+ promise
344
+ end
345
+
346
+ #
347
+ # Delete Live Event
348
+ #
349
+ # Deletes a live event.
350
+ #
351
+ # @param resource_group_name [String] The name of the resource group within the
352
+ # Azure subscription.
353
+ # @param account_name [String] The Media Services account name.
354
+ # @param live_event_name [String] The name of the live event, maximum length is
355
+ # 32.
356
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
357
+ # will be added to the HTTP request.
358
+ #
359
+ def delete(resource_group_name, account_name, live_event_name, custom_headers:nil)
360
+ response = delete_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
361
+ nil
362
+ end
363
+
364
+ #
365
+ # @param resource_group_name [String] The name of the resource group within the
366
+ # Azure subscription.
367
+ # @param account_name [String] The Media Services account name.
368
+ # @param live_event_name [String] The name of the live event, maximum length is
369
+ # 32.
370
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
371
+ # will be added to the HTTP request.
372
+ #
373
+ # @return [Concurrent::Promise] promise which provides async access to http
374
+ # response.
375
+ #
376
+ def delete_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
377
+ # Send request
378
+ promise = begin_delete_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers)
379
+
380
+ promise = promise.then do |response|
381
+ # Defining deserialization method.
382
+ deserialize_method = lambda do |parsed_response|
383
+ end
384
+
385
+ # Waiting for response.
386
+ @client.get_long_running_operation_result(response, deserialize_method)
387
+ end
388
+
389
+ promise
390
+ end
391
+
392
+ #
393
+ # Allocate resources for a live event
394
+ #
395
+ # A live event is in StandBy state after allocation completes, and is ready to
396
+ # start.
397
+ #
398
+ # @param resource_group_name [String] The name of the resource group within the
399
+ # Azure subscription.
400
+ # @param account_name [String] The Media Services account name.
401
+ # @param live_event_name [String] The name of the live event, maximum length is
402
+ # 32.
403
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
404
+ # will be added to the HTTP request.
405
+ #
406
+ def allocate(resource_group_name, account_name, live_event_name, custom_headers:nil)
407
+ response = allocate_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
408
+ nil
409
+ end
410
+
411
+ #
412
+ # @param resource_group_name [String] The name of the resource group within the
413
+ # Azure subscription.
414
+ # @param account_name [String] The Media Services account name.
415
+ # @param live_event_name [String] The name of the live event, maximum length is
416
+ # 32.
417
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
418
+ # will be added to the HTTP request.
419
+ #
420
+ # @return [Concurrent::Promise] promise which provides async access to http
421
+ # response.
422
+ #
423
+ def allocate_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
424
+ # Send request
425
+ promise = begin_allocate_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers)
426
+
427
+ promise = promise.then do |response|
428
+ # Defining deserialization method.
429
+ deserialize_method = lambda do |parsed_response|
430
+ end
431
+
432
+ # Waiting for response.
433
+ @client.get_long_running_operation_result(response, deserialize_method)
434
+ end
435
+
436
+ promise
437
+ end
438
+
439
+ #
440
+ # Start Live Event
441
+ #
442
+ # A live event in Stopped or StandBy state will be in Running state after the
443
+ # start operation completes.
444
+ #
445
+ # @param resource_group_name [String] The name of the resource group within the
446
+ # Azure subscription.
447
+ # @param account_name [String] The Media Services account name.
448
+ # @param live_event_name [String] The name of the live event, maximum length is
449
+ # 32.
450
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
451
+ # will be added to the HTTP request.
452
+ #
453
+ def start(resource_group_name, account_name, live_event_name, custom_headers:nil)
454
+ response = start_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
455
+ nil
456
+ end
457
+
458
+ #
459
+ # @param resource_group_name [String] The name of the resource group within the
460
+ # Azure subscription.
461
+ # @param account_name [String] The Media Services account name.
462
+ # @param live_event_name [String] The name of the live event, maximum length is
463
+ # 32.
464
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
465
+ # will be added to the HTTP request.
466
+ #
467
+ # @return [Concurrent::Promise] promise which provides async access to http
468
+ # response.
469
+ #
470
+ def start_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
471
+ # Send request
472
+ promise = begin_start_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers)
473
+
474
+ promise = promise.then do |response|
475
+ # Defining deserialization method.
476
+ deserialize_method = lambda do |parsed_response|
477
+ end
478
+
479
+ # Waiting for response.
480
+ @client.get_long_running_operation_result(response, deserialize_method)
481
+ end
482
+
483
+ promise
484
+ end
485
+
486
+ #
487
+ # Stop Live Event
488
+ #
489
+ # Stops a running live event.
490
+ #
491
+ # @param resource_group_name [String] The name of the resource group within the
492
+ # Azure subscription.
493
+ # @param account_name [String] The Media Services account name.
494
+ # @param live_event_name [String] The name of the live event, maximum length is
495
+ # 32.
496
+ # @param parameters [LiveEventActionInput] LiveEvent stop parameters
497
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
498
+ # will be added to the HTTP request.
499
+ #
500
+ def stop(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
501
+ response = stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
502
+ nil
503
+ end
504
+
505
+ #
506
+ # @param resource_group_name [String] The name of the resource group within the
507
+ # Azure subscription.
508
+ # @param account_name [String] The Media Services account name.
509
+ # @param live_event_name [String] The name of the live event, maximum length is
510
+ # 32.
511
+ # @param parameters [LiveEventActionInput] LiveEvent stop parameters
512
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
513
+ # will be added to the HTTP request.
514
+ #
515
+ # @return [Concurrent::Promise] promise which provides async access to http
516
+ # response.
517
+ #
518
+ def stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
519
+ # Send request
520
+ promise = begin_stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers)
521
+
522
+ promise = promise.then do |response|
523
+ # Defining deserialization method.
524
+ deserialize_method = lambda do |parsed_response|
525
+ end
526
+
527
+ # Waiting for response.
528
+ @client.get_long_running_operation_result(response, deserialize_method)
529
+ end
530
+
531
+ promise
532
+ end
533
+
534
+ #
535
+ # Reset Live Event
536
+ #
537
+ # Resets an existing live event. All live outputs for the live event are
538
+ # deleted and the live event is stopped and will be started again. All assets
539
+ # used by the live outputs and streaming locators created on these assets are
540
+ # unaffected.
541
+ #
542
+ # @param resource_group_name [String] The name of the resource group within the
543
+ # Azure subscription.
544
+ # @param account_name [String] The Media Services account name.
545
+ # @param live_event_name [String] The name of the live event, maximum length is
546
+ # 32.
547
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
548
+ # will be added to the HTTP request.
549
+ #
550
+ def reset(resource_group_name, account_name, live_event_name, custom_headers:nil)
551
+ response = reset_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
552
+ nil
553
+ end
554
+
555
+ #
556
+ # @param resource_group_name [String] The name of the resource group within the
557
+ # Azure subscription.
558
+ # @param account_name [String] The Media Services account name.
559
+ # @param live_event_name [String] The name of the live event, maximum length is
560
+ # 32.
561
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
562
+ # will be added to the HTTP request.
563
+ #
564
+ # @return [Concurrent::Promise] promise which provides async access to http
565
+ # response.
566
+ #
567
+ def reset_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
568
+ # Send request
569
+ promise = begin_reset_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers)
570
+
571
+ promise = promise.then do |response|
572
+ # Defining deserialization method.
573
+ deserialize_method = lambda do |parsed_response|
574
+ end
575
+
576
+ # Waiting for response.
577
+ @client.get_long_running_operation_result(response, deserialize_method)
578
+ end
579
+
580
+ promise
581
+ end
582
+
583
+ #
584
+ # Create Live Event
585
+ #
586
+ # Creates a new live event.
587
+ #
588
+ # @param resource_group_name [String] The name of the resource group within the
589
+ # Azure subscription.
590
+ # @param account_name [String] The Media Services account name.
591
+ # @param live_event_name [String] The name of the live event, maximum length is
592
+ # 32.
593
+ # @param parameters [LiveEvent] Live event properties needed for creation.
594
+ # @param auto_start [Boolean] The flag indicates if the resource should be
595
+ # automatically started on creation.
596
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
597
+ # will be added to the HTTP request.
598
+ #
599
+ # @return [LiveEvent] operation results.
600
+ #
601
+ def begin_create(resource_group_name, account_name, live_event_name, parameters, auto_start:nil, custom_headers:nil)
602
+ response = begin_create_async(resource_group_name, account_name, live_event_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value!
603
+ response.body unless response.nil?
604
+ end
605
+
606
+ #
607
+ # Create Live Event
608
+ #
609
+ # Creates a new live event.
610
+ #
611
+ # @param resource_group_name [String] The name of the resource group within the
612
+ # Azure subscription.
613
+ # @param account_name [String] The Media Services account name.
614
+ # @param live_event_name [String] The name of the live event, maximum length is
615
+ # 32.
616
+ # @param parameters [LiveEvent] Live event properties needed for creation.
617
+ # @param auto_start [Boolean] The flag indicates if the resource should be
618
+ # automatically started on creation.
619
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
620
+ # will be added to the HTTP request.
621
+ #
622
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
623
+ #
624
+ def begin_create_with_http_info(resource_group_name, account_name, live_event_name, parameters, auto_start:nil, custom_headers:nil)
625
+ begin_create_async(resource_group_name, account_name, live_event_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value!
626
+ end
627
+
628
+ #
629
+ # Create Live Event
630
+ #
631
+ # Creates a new live event.
632
+ #
633
+ # @param resource_group_name [String] The name of the resource group within the
634
+ # Azure subscription.
635
+ # @param account_name [String] The Media Services account name.
636
+ # @param live_event_name [String] The name of the live event, maximum length is
637
+ # 32.
638
+ # @param parameters [LiveEvent] Live event properties needed for creation.
639
+ # @param auto_start [Boolean] The flag indicates if the resource should be
640
+ # automatically started on creation.
641
+ # @param [Hash{String => String}] A hash of custom headers that will be added
642
+ # to the HTTP request.
643
+ #
644
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
645
+ #
646
+ def begin_create_async(resource_group_name, account_name, live_event_name, parameters, auto_start:nil, custom_headers:nil)
647
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
648
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
649
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
650
+ fail ArgumentError, 'live_event_name is nil' if live_event_name.nil?
651
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MaxLength': '32'" if !live_event_name.nil? && live_event_name.length > 32
652
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MinLength': '1'" if !live_event_name.nil? && live_event_name.length < 1
653
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !live_event_name.nil? && live_event_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
654
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
655
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
656
+
657
+
658
+ request_headers = {}
659
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
660
+
661
+ # Set Headers
662
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
663
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
664
+
665
+ # Serialize Request
666
+ request_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
667
+ request_content = @client.serialize(request_mapper, parameters)
668
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
669
+
670
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}'
671
+
672
+ request_url = @base_url || @client.base_url
673
+
674
+ options = {
675
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
676
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'liveEventName' => live_event_name},
677
+ query_params: {'api-version' => @client.api_version,'autoStart' => auto_start},
678
+ body: request_content,
679
+ headers: request_headers.merge(custom_headers || {}),
680
+ base_url: request_url
681
+ }
682
+ promise = @client.make_request_async(:put, path_template, options)
683
+
684
+ promise = promise.then do |result|
685
+ http_response = result.response
686
+ status_code = http_response.status
687
+ response_content = http_response.body
688
+ unless status_code == 200 || status_code == 201
689
+ error_model = JSON.load(response_content)
690
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
691
+ end
692
+
693
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
694
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
695
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
696
+ # Deserialize Response
697
+ if status_code == 200
698
+ begin
699
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
700
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
701
+ result.body = @client.deserialize(result_mapper, parsed_response)
702
+ rescue Exception => e
703
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
704
+ end
705
+ end
706
+ # Deserialize Response
707
+ if status_code == 201
708
+ begin
709
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
710
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
711
+ result.body = @client.deserialize(result_mapper, parsed_response)
712
+ rescue Exception => e
713
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
714
+ end
715
+ end
716
+
717
+ result
718
+ end
719
+
720
+ promise.execute
721
+ end
722
+
723
+ #
724
+ # Updates settings on an existing live event.
725
+ #
726
+ # @param resource_group_name [String] The name of the resource group within the
727
+ # Azure subscription.
728
+ # @param account_name [String] The Media Services account name.
729
+ # @param live_event_name [String] The name of the live event, maximum length is
730
+ # 32.
731
+ # @param parameters [LiveEvent] Live event properties needed for patch.
732
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
733
+ # will be added to the HTTP request.
734
+ #
735
+ # @return [LiveEvent] operation results.
736
+ #
737
+ def begin_update(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
738
+ response = begin_update_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
739
+ response.body unless response.nil?
740
+ end
741
+
742
+ #
743
+ # Updates settings on an existing live event.
744
+ #
745
+ # @param resource_group_name [String] The name of the resource group within the
746
+ # Azure subscription.
747
+ # @param account_name [String] The Media Services account name.
748
+ # @param live_event_name [String] The name of the live event, maximum length is
749
+ # 32.
750
+ # @param parameters [LiveEvent] Live event properties needed for patch.
751
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
752
+ # will be added to the HTTP request.
753
+ #
754
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
755
+ #
756
+ def begin_update_with_http_info(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
757
+ begin_update_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
758
+ end
759
+
760
+ #
761
+ # Updates settings on an existing live event.
762
+ #
763
+ # @param resource_group_name [String] The name of the resource group within the
764
+ # Azure subscription.
765
+ # @param account_name [String] The Media Services account name.
766
+ # @param live_event_name [String] The name of the live event, maximum length is
767
+ # 32.
768
+ # @param parameters [LiveEvent] Live event properties needed for patch.
769
+ # @param [Hash{String => String}] A hash of custom headers that will be added
770
+ # to the HTTP request.
771
+ #
772
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
773
+ #
774
+ def begin_update_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
775
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
776
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
777
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
778
+ fail ArgumentError, 'live_event_name is nil' if live_event_name.nil?
779
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MaxLength': '32'" if !live_event_name.nil? && live_event_name.length > 32
780
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MinLength': '1'" if !live_event_name.nil? && live_event_name.length < 1
781
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !live_event_name.nil? && live_event_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
782
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
783
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
784
+
785
+
786
+ request_headers = {}
787
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
788
+
789
+ # Set Headers
790
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
791
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
792
+
793
+ # Serialize Request
794
+ request_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
795
+ request_content = @client.serialize(request_mapper, parameters)
796
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
797
+
798
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}'
799
+
800
+ request_url = @base_url || @client.base_url
801
+
802
+ options = {
803
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
804
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'liveEventName' => live_event_name},
805
+ query_params: {'api-version' => @client.api_version},
806
+ body: request_content,
807
+ headers: request_headers.merge(custom_headers || {}),
808
+ base_url: request_url
809
+ }
810
+ promise = @client.make_request_async(:patch, path_template, options)
811
+
812
+ promise = promise.then do |result|
813
+ http_response = result.response
814
+ status_code = http_response.status
815
+ response_content = http_response.body
816
+ unless status_code == 200 || status_code == 202
817
+ error_model = JSON.load(response_content)
818
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
819
+ end
820
+
821
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
822
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
823
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
824
+ # Deserialize Response
825
+ if status_code == 200
826
+ begin
827
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
828
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
829
+ result.body = @client.deserialize(result_mapper, parsed_response)
830
+ rescue Exception => e
831
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
832
+ end
833
+ end
834
+ # Deserialize Response
835
+ if status_code == 202
836
+ begin
837
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
838
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEvent.mapper()
839
+ result.body = @client.deserialize(result_mapper, parsed_response)
840
+ rescue Exception => e
841
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
842
+ end
843
+ end
844
+
845
+ result
846
+ end
847
+
848
+ promise.execute
849
+ end
850
+
851
+ #
852
+ # Delete Live Event
853
+ #
854
+ # Deletes a live event.
855
+ #
856
+ # @param resource_group_name [String] The name of the resource group within the
857
+ # Azure subscription.
858
+ # @param account_name [String] The Media Services account name.
859
+ # @param live_event_name [String] The name of the live event, maximum length is
860
+ # 32.
861
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
862
+ # will be added to the HTTP request.
863
+ #
864
+ #
865
+ def begin_delete(resource_group_name, account_name, live_event_name, custom_headers:nil)
866
+ response = begin_delete_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
867
+ nil
868
+ end
869
+
870
+ #
871
+ # Delete Live Event
872
+ #
873
+ # Deletes a live event.
874
+ #
875
+ # @param resource_group_name [String] The name of the resource group within the
876
+ # Azure subscription.
877
+ # @param account_name [String] The Media Services account name.
878
+ # @param live_event_name [String] The name of the live event, maximum length is
879
+ # 32.
880
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
881
+ # will be added to the HTTP request.
882
+ #
883
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
884
+ #
885
+ def begin_delete_with_http_info(resource_group_name, account_name, live_event_name, custom_headers:nil)
886
+ begin_delete_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
887
+ end
888
+
889
+ #
890
+ # Delete Live Event
891
+ #
892
+ # Deletes a live event.
893
+ #
894
+ # @param resource_group_name [String] The name of the resource group within the
895
+ # Azure subscription.
896
+ # @param account_name [String] The Media Services account name.
897
+ # @param live_event_name [String] The name of the live event, maximum length is
898
+ # 32.
899
+ # @param [Hash{String => String}] A hash of custom headers that will be added
900
+ # to the HTTP request.
901
+ #
902
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
903
+ #
904
+ def begin_delete_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
905
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
906
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
907
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
908
+ fail ArgumentError, 'live_event_name is nil' if live_event_name.nil?
909
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MaxLength': '32'" if !live_event_name.nil? && live_event_name.length > 32
910
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MinLength': '1'" if !live_event_name.nil? && live_event_name.length < 1
911
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !live_event_name.nil? && live_event_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
912
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
913
+
914
+
915
+ request_headers = {}
916
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
917
+
918
+ # Set Headers
919
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
920
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
921
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}'
922
+
923
+ request_url = @base_url || @client.base_url
924
+
925
+ options = {
926
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
927
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'liveEventName' => live_event_name},
928
+ query_params: {'api-version' => @client.api_version},
929
+ headers: request_headers.merge(custom_headers || {}),
930
+ base_url: request_url
931
+ }
932
+ promise = @client.make_request_async(:delete, path_template, options)
933
+
934
+ promise = promise.then do |result|
935
+ http_response = result.response
936
+ status_code = http_response.status
937
+ response_content = http_response.body
938
+ unless status_code == 200 || status_code == 202 || status_code == 204
939
+ error_model = JSON.load(response_content)
940
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
941
+ end
942
+
943
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
944
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
945
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
946
+
947
+ result
948
+ end
949
+
950
+ promise.execute
951
+ end
952
+
953
+ #
954
+ # Allocate resources for a live event
955
+ #
956
+ # A live event is in StandBy state after allocation completes, and is ready to
957
+ # start.
958
+ #
959
+ # @param resource_group_name [String] The name of the resource group within the
960
+ # Azure subscription.
961
+ # @param account_name [String] The Media Services account name.
962
+ # @param live_event_name [String] The name of the live event, maximum length is
963
+ # 32.
964
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
965
+ # will be added to the HTTP request.
966
+ #
967
+ #
968
+ def begin_allocate(resource_group_name, account_name, live_event_name, custom_headers:nil)
969
+ response = begin_allocate_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
970
+ nil
971
+ end
972
+
973
+ #
974
+ # Allocate resources for a live event
975
+ #
976
+ # A live event is in StandBy state after allocation completes, and is ready to
977
+ # start.
978
+ #
979
+ # @param resource_group_name [String] The name of the resource group within the
980
+ # Azure subscription.
981
+ # @param account_name [String] The Media Services account name.
982
+ # @param live_event_name [String] The name of the live event, maximum length is
983
+ # 32.
984
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
985
+ # will be added to the HTTP request.
986
+ #
987
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
988
+ #
989
+ def begin_allocate_with_http_info(resource_group_name, account_name, live_event_name, custom_headers:nil)
990
+ begin_allocate_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
991
+ end
992
+
993
+ #
994
+ # Allocate resources for a live event
995
+ #
996
+ # A live event is in StandBy state after allocation completes, and is ready to
997
+ # start.
998
+ #
999
+ # @param resource_group_name [String] The name of the resource group within the
1000
+ # Azure subscription.
1001
+ # @param account_name [String] The Media Services account name.
1002
+ # @param live_event_name [String] The name of the live event, maximum length is
1003
+ # 32.
1004
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1005
+ # to the HTTP request.
1006
+ #
1007
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1008
+ #
1009
+ def begin_allocate_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
1010
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1011
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1012
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1013
+ fail ArgumentError, 'live_event_name is nil' if live_event_name.nil?
1014
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MaxLength': '32'" if !live_event_name.nil? && live_event_name.length > 32
1015
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MinLength': '1'" if !live_event_name.nil? && live_event_name.length < 1
1016
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !live_event_name.nil? && live_event_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
1017
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1018
+
1019
+
1020
+ request_headers = {}
1021
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1022
+
1023
+ # Set Headers
1024
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1025
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1026
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/allocate'
1027
+
1028
+ request_url = @base_url || @client.base_url
1029
+
1030
+ options = {
1031
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1032
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'liveEventName' => live_event_name},
1033
+ query_params: {'api-version' => @client.api_version},
1034
+ headers: request_headers.merge(custom_headers || {}),
1035
+ base_url: request_url
1036
+ }
1037
+ promise = @client.make_request_async(:post, path_template, options)
1038
+
1039
+ promise = promise.then do |result|
1040
+ http_response = result.response
1041
+ status_code = http_response.status
1042
+ response_content = http_response.body
1043
+ unless status_code == 200 || status_code == 202
1044
+ error_model = JSON.load(response_content)
1045
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1046
+ end
1047
+
1048
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1049
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1050
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1051
+
1052
+ result
1053
+ end
1054
+
1055
+ promise.execute
1056
+ end
1057
+
1058
+ #
1059
+ # Start Live Event
1060
+ #
1061
+ # A live event in Stopped or StandBy state will be in Running state after the
1062
+ # start operation completes.
1063
+ #
1064
+ # @param resource_group_name [String] The name of the resource group within the
1065
+ # Azure subscription.
1066
+ # @param account_name [String] The Media Services account name.
1067
+ # @param live_event_name [String] The name of the live event, maximum length is
1068
+ # 32.
1069
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1070
+ # will be added to the HTTP request.
1071
+ #
1072
+ #
1073
+ def begin_start(resource_group_name, account_name, live_event_name, custom_headers:nil)
1074
+ response = begin_start_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
1075
+ nil
1076
+ end
1077
+
1078
+ #
1079
+ # Start Live Event
1080
+ #
1081
+ # A live event in Stopped or StandBy state will be in Running state after the
1082
+ # start operation completes.
1083
+ #
1084
+ # @param resource_group_name [String] The name of the resource group within the
1085
+ # Azure subscription.
1086
+ # @param account_name [String] The Media Services account name.
1087
+ # @param live_event_name [String] The name of the live event, maximum length is
1088
+ # 32.
1089
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1090
+ # will be added to the HTTP request.
1091
+ #
1092
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1093
+ #
1094
+ def begin_start_with_http_info(resource_group_name, account_name, live_event_name, custom_headers:nil)
1095
+ begin_start_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
1096
+ end
1097
+
1098
+ #
1099
+ # Start Live Event
1100
+ #
1101
+ # A live event in Stopped or StandBy state will be in Running state after the
1102
+ # start operation completes.
1103
+ #
1104
+ # @param resource_group_name [String] The name of the resource group within the
1105
+ # Azure subscription.
1106
+ # @param account_name [String] The Media Services account name.
1107
+ # @param live_event_name [String] The name of the live event, maximum length is
1108
+ # 32.
1109
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1110
+ # to the HTTP request.
1111
+ #
1112
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1113
+ #
1114
+ def begin_start_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
1115
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1116
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1117
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1118
+ fail ArgumentError, 'live_event_name is nil' if live_event_name.nil?
1119
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MaxLength': '32'" if !live_event_name.nil? && live_event_name.length > 32
1120
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MinLength': '1'" if !live_event_name.nil? && live_event_name.length < 1
1121
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !live_event_name.nil? && live_event_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
1122
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1123
+
1124
+
1125
+ request_headers = {}
1126
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1127
+
1128
+ # Set Headers
1129
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1130
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1131
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/start'
1132
+
1133
+ request_url = @base_url || @client.base_url
1134
+
1135
+ options = {
1136
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1137
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'liveEventName' => live_event_name},
1138
+ query_params: {'api-version' => @client.api_version},
1139
+ headers: request_headers.merge(custom_headers || {}),
1140
+ base_url: request_url
1141
+ }
1142
+ promise = @client.make_request_async(:post, path_template, options)
1143
+
1144
+ promise = promise.then do |result|
1145
+ http_response = result.response
1146
+ status_code = http_response.status
1147
+ response_content = http_response.body
1148
+ unless status_code == 200 || status_code == 202
1149
+ error_model = JSON.load(response_content)
1150
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1151
+ end
1152
+
1153
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1154
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1155
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1156
+
1157
+ result
1158
+ end
1159
+
1160
+ promise.execute
1161
+ end
1162
+
1163
+ #
1164
+ # Stop Live Event
1165
+ #
1166
+ # Stops a running live event.
1167
+ #
1168
+ # @param resource_group_name [String] The name of the resource group within the
1169
+ # Azure subscription.
1170
+ # @param account_name [String] The Media Services account name.
1171
+ # @param live_event_name [String] The name of the live event, maximum length is
1172
+ # 32.
1173
+ # @param parameters [LiveEventActionInput] LiveEvent stop parameters
1174
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1175
+ # will be added to the HTTP request.
1176
+ #
1177
+ #
1178
+ def begin_stop(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
1179
+ response = begin_stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
1180
+ nil
1181
+ end
1182
+
1183
+ #
1184
+ # Stop Live Event
1185
+ #
1186
+ # Stops a running live event.
1187
+ #
1188
+ # @param resource_group_name [String] The name of the resource group within the
1189
+ # Azure subscription.
1190
+ # @param account_name [String] The Media Services account name.
1191
+ # @param live_event_name [String] The name of the live event, maximum length is
1192
+ # 32.
1193
+ # @param parameters [LiveEventActionInput] LiveEvent stop parameters
1194
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1195
+ # will be added to the HTTP request.
1196
+ #
1197
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1198
+ #
1199
+ def begin_stop_with_http_info(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
1200
+ begin_stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:custom_headers).value!
1201
+ end
1202
+
1203
+ #
1204
+ # Stop Live Event
1205
+ #
1206
+ # Stops a running live event.
1207
+ #
1208
+ # @param resource_group_name [String] The name of the resource group within the
1209
+ # Azure subscription.
1210
+ # @param account_name [String] The Media Services account name.
1211
+ # @param live_event_name [String] The name of the live event, maximum length is
1212
+ # 32.
1213
+ # @param parameters [LiveEventActionInput] LiveEvent stop parameters
1214
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1215
+ # to the HTTP request.
1216
+ #
1217
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1218
+ #
1219
+ def begin_stop_async(resource_group_name, account_name, live_event_name, parameters, custom_headers:nil)
1220
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1221
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1222
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1223
+ fail ArgumentError, 'live_event_name is nil' if live_event_name.nil?
1224
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MaxLength': '32'" if !live_event_name.nil? && live_event_name.length > 32
1225
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MinLength': '1'" if !live_event_name.nil? && live_event_name.length < 1
1226
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !live_event_name.nil? && live_event_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
1227
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1228
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1229
+
1230
+
1231
+ request_headers = {}
1232
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1233
+
1234
+ # Set Headers
1235
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1236
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1237
+
1238
+ # Serialize Request
1239
+ request_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEventActionInput.mapper()
1240
+ request_content = @client.serialize(request_mapper, parameters)
1241
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1242
+
1243
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/stop'
1244
+
1245
+ request_url = @base_url || @client.base_url
1246
+
1247
+ options = {
1248
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1249
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'liveEventName' => live_event_name},
1250
+ query_params: {'api-version' => @client.api_version},
1251
+ body: request_content,
1252
+ headers: request_headers.merge(custom_headers || {}),
1253
+ base_url: request_url
1254
+ }
1255
+ promise = @client.make_request_async(:post, path_template, options)
1256
+
1257
+ promise = promise.then do |result|
1258
+ http_response = result.response
1259
+ status_code = http_response.status
1260
+ response_content = http_response.body
1261
+ unless status_code == 200 || status_code == 202
1262
+ error_model = JSON.load(response_content)
1263
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1264
+ end
1265
+
1266
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1267
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1268
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1269
+
1270
+ result
1271
+ end
1272
+
1273
+ promise.execute
1274
+ end
1275
+
1276
+ #
1277
+ # Reset Live Event
1278
+ #
1279
+ # Resets an existing live event. All live outputs for the live event are
1280
+ # deleted and the live event is stopped and will be started again. All assets
1281
+ # used by the live outputs and streaming locators created on these assets are
1282
+ # unaffected.
1283
+ #
1284
+ # @param resource_group_name [String] The name of the resource group within the
1285
+ # Azure subscription.
1286
+ # @param account_name [String] The Media Services account name.
1287
+ # @param live_event_name [String] The name of the live event, maximum length is
1288
+ # 32.
1289
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1290
+ # will be added to the HTTP request.
1291
+ #
1292
+ #
1293
+ def begin_reset(resource_group_name, account_name, live_event_name, custom_headers:nil)
1294
+ response = begin_reset_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
1295
+ nil
1296
+ end
1297
+
1298
+ #
1299
+ # Reset Live Event
1300
+ #
1301
+ # Resets an existing live event. All live outputs for the live event are
1302
+ # deleted and the live event is stopped and will be started again. All assets
1303
+ # used by the live outputs and streaming locators created on these assets are
1304
+ # unaffected.
1305
+ #
1306
+ # @param resource_group_name [String] The name of the resource group within the
1307
+ # Azure subscription.
1308
+ # @param account_name [String] The Media Services account name.
1309
+ # @param live_event_name [String] The name of the live event, maximum length is
1310
+ # 32.
1311
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1312
+ # will be added to the HTTP request.
1313
+ #
1314
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1315
+ #
1316
+ def begin_reset_with_http_info(resource_group_name, account_name, live_event_name, custom_headers:nil)
1317
+ begin_reset_async(resource_group_name, account_name, live_event_name, custom_headers:custom_headers).value!
1318
+ end
1319
+
1320
+ #
1321
+ # Reset Live Event
1322
+ #
1323
+ # Resets an existing live event. All live outputs for the live event are
1324
+ # deleted and the live event is stopped and will be started again. All assets
1325
+ # used by the live outputs and streaming locators created on these assets are
1326
+ # unaffected.
1327
+ #
1328
+ # @param resource_group_name [String] The name of the resource group within the
1329
+ # Azure subscription.
1330
+ # @param account_name [String] The Media Services account name.
1331
+ # @param live_event_name [String] The name of the live event, maximum length is
1332
+ # 32.
1333
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1334
+ # to the HTTP request.
1335
+ #
1336
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1337
+ #
1338
+ def begin_reset_async(resource_group_name, account_name, live_event_name, custom_headers:nil)
1339
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1340
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1341
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1342
+ fail ArgumentError, 'live_event_name is nil' if live_event_name.nil?
1343
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MaxLength': '32'" if !live_event_name.nil? && live_event_name.length > 32
1344
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'MinLength': '1'" if !live_event_name.nil? && live_event_name.length < 1
1345
+ fail ArgumentError, "'live_event_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !live_event_name.nil? && live_event_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
1346
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1347
+
1348
+
1349
+ request_headers = {}
1350
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1351
+
1352
+ # Set Headers
1353
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1354
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1355
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/reset'
1356
+
1357
+ request_url = @base_url || @client.base_url
1358
+
1359
+ options = {
1360
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1361
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'liveEventName' => live_event_name},
1362
+ query_params: {'api-version' => @client.api_version},
1363
+ headers: request_headers.merge(custom_headers || {}),
1364
+ base_url: request_url
1365
+ }
1366
+ promise = @client.make_request_async(:post, path_template, options)
1367
+
1368
+ promise = promise.then do |result|
1369
+ http_response = result.response
1370
+ status_code = http_response.status
1371
+ response_content = http_response.body
1372
+ unless status_code == 200 || status_code == 202
1373
+ error_model = JSON.load(response_content)
1374
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1375
+ end
1376
+
1377
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1378
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1379
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1380
+
1381
+ result
1382
+ end
1383
+
1384
+ promise.execute
1385
+ end
1386
+
1387
+ #
1388
+ # List live events
1389
+ #
1390
+ # Lists all the live events in the account.
1391
+ #
1392
+ # @param next_page_link [String] The NextLink from the previous successful call
1393
+ # to List operation.
1394
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1395
+ # will be added to the HTTP request.
1396
+ #
1397
+ # @return [LiveEventListResult] operation results.
1398
+ #
1399
+ def list_next(next_page_link, custom_headers:nil)
1400
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1401
+ response.body unless response.nil?
1402
+ end
1403
+
1404
+ #
1405
+ # List live events
1406
+ #
1407
+ # Lists all the live events in the account.
1408
+ #
1409
+ # @param next_page_link [String] The NextLink from the previous successful call
1410
+ # to List operation.
1411
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1412
+ # will be added to the HTTP request.
1413
+ #
1414
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1415
+ #
1416
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1417
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1418
+ end
1419
+
1420
+ #
1421
+ # List live events
1422
+ #
1423
+ # Lists all the live events in the account.
1424
+ #
1425
+ # @param next_page_link [String] The NextLink from the previous successful call
1426
+ # to List operation.
1427
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1428
+ # to the HTTP request.
1429
+ #
1430
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1431
+ #
1432
+ def list_next_async(next_page_link, custom_headers:nil)
1433
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1434
+
1435
+
1436
+ request_headers = {}
1437
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1438
+
1439
+ # Set Headers
1440
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1441
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1442
+ path_template = '{nextLink}'
1443
+
1444
+ request_url = @base_url || @client.base_url
1445
+
1446
+ options = {
1447
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1448
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1449
+ headers: request_headers.merge(custom_headers || {}),
1450
+ base_url: request_url
1451
+ }
1452
+ promise = @client.make_request_async(:get, path_template, options)
1453
+
1454
+ promise = promise.then do |result|
1455
+ http_response = result.response
1456
+ status_code = http_response.status
1457
+ response_content = http_response.body
1458
+ unless status_code == 200
1459
+ error_model = JSON.load(response_content)
1460
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1461
+ end
1462
+
1463
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1464
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1465
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1466
+ # Deserialize Response
1467
+ if status_code == 200
1468
+ begin
1469
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1470
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::LiveEventListResult.mapper()
1471
+ result.body = @client.deserialize(result_mapper, parsed_response)
1472
+ rescue Exception => e
1473
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1474
+ end
1475
+ end
1476
+
1477
+ result
1478
+ end
1479
+
1480
+ promise.execute
1481
+ end
1482
+
1483
+ #
1484
+ # List live events
1485
+ #
1486
+ # Lists all the live events in the account.
1487
+ #
1488
+ # @param resource_group_name [String] The name of the resource group within the
1489
+ # Azure subscription.
1490
+ # @param account_name [String] The Media Services account name.
1491
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1492
+ # will be added to the HTTP request.
1493
+ #
1494
+ # @return [LiveEventListResult] which provide lazy access to pages of the
1495
+ # response.
1496
+ #
1497
+ def list_as_lazy(resource_group_name, account_name, custom_headers:nil)
1498
+ response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
1499
+ unless response.nil?
1500
+ page = response.body
1501
+ page.next_method = Proc.new do |next_page_link|
1502
+ list_next_async(next_page_link, custom_headers:custom_headers)
1503
+ end
1504
+ page
1505
+ end
1506
+ end
1507
+
1508
+ end
1509
+ end