azure_mgmt_media_services 0.21.0 → 0.21.1

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