azure_mgmt_media_services 0.16.1 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-10-01/generated/azure_mgmt_media_services/media_services_management_client.rb +7 -6
  3. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services.rb +6 -6
  4. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/azure_media_services.rb +7 -6
  5. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/models/api_error.rb +1 -1
  6. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services.rb +212 -0
  7. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/assets.rb +946 -0
  8. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/azure_media_services.rb +177 -0
  9. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/content_key_policies.rb +815 -0
  10. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/jobs.rb +702 -0
  11. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/live_events.rb +1285 -0
  12. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/live_outputs.rb +706 -0
  13. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/locations.rb +130 -0
  14. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/mediaservices.rb +1069 -0
  15. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/aac_audio.rb +95 -0
  16. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/aac_audio_profile.rb +17 -0
  17. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/akamai_access_control.rb +56 -0
  18. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/akamai_signature_header_authentication_key.rb +68 -0
  19. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/api_error.rb +47 -0
  20. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/asset.rb +157 -0
  21. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/asset_collection.rb +99 -0
  22. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/asset_container_permission.rb +17 -0
  23. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/asset_container_sas.rb +54 -0
  24. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/asset_storage_encryption_format.rb +16 -0
  25. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/asset_storage_encryption_key.rb +46 -0
  26. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/audio.rb +92 -0
  27. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/audio_analyzer_preset.rb +66 -0
  28. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/audio_overlay.rb +98 -0
  29. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/built_in_standard_encoder_preset.rb +66 -0
  30. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/cbcs_drm_configuration.rb +73 -0
  31. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/cenc_drm_configuration.rb +61 -0
  32. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/check_name_availability_input.rb +58 -0
  33. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/codec.rb +66 -0
  34. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/common_encryption_cbcs.rb +95 -0
  35. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/common_encryption_cenc.rb +95 -0
  36. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy.rb +129 -0
  37. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_clear_key_configuration.rb +50 -0
  38. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_collection.rb +100 -0
  39. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_configuration.rb +51 -0
  40. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_configuration.rb +111 -0
  41. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_rental_and_lease_key_type.rb +18 -0
  42. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_open_restriction.rb +51 -0
  43. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_option.rb +87 -0
  44. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_configuration.rb +82 -0
  45. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_encryption_key_from_header.rb +51 -0
  46. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_encryption_key_from_key_identifier.rb +64 -0
  47. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_key_location.rb +49 -0
  48. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_type.rb +18 -0
  49. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_explicit_analog_television_restriction.rb +61 -0
  50. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_license.rb +156 -0
  51. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_license_type.rb +17 -0
  52. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_play_right.rb +196 -0
  53. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_unknown_output_passing_option.rb +18 -0
  54. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_properties.rb +102 -0
  55. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_restriction.rb +49 -0
  56. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_restriction_token_key.rb +49 -0
  57. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_restriction_token_type.rb +17 -0
  58. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_rsa_token_key.rb +72 -0
  59. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_symmetric_token_key.rb +61 -0
  60. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_token_claim.rb +57 -0
  61. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_token_restriction.rb +156 -0
  62. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_unknown_configuration.rb +51 -0
  63. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_unknown_restriction.rb +51 -0
  64. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_widevine_configuration.rb +61 -0
  65. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/content_key_policy_x509certificate_token_key.rb +62 -0
  66. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/copy_audio.rb +58 -0
  67. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/copy_video.rb +59 -0
  68. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/cross_site_access_policies.rb +58 -0
  69. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/default_key.rb +59 -0
  70. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/deinterlace.rb +62 -0
  71. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/deinterlace_mode.rb +16 -0
  72. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/deinterlace_parity.rb +17 -0
  73. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/enabled_protocols.rb +79 -0
  74. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/encoder_named_preset.rb +19 -0
  75. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/encryption_scheme.rb +18 -0
  76. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/entity_name_availability_check_output.rb +69 -0
  77. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/entropy_mode.rb +16 -0
  78. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/envelope_encryption.rb +94 -0
  79. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/filters.rb +98 -0
  80. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/format.rb +69 -0
  81. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/h264complexity.rb +17 -0
  82. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/h264layer.rb +191 -0
  83. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/h264video.rb +124 -0
  84. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/h264video_profile.rb +20 -0
  85. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/hls.rb +47 -0
  86. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/image.rb +121 -0
  87. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/image_format.rb +58 -0
  88. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/ipaccess_control.rb +55 -0
  89. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/iprange.rb +68 -0
  90. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job.rb +186 -0
  91. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_collection.rb +99 -0
  92. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_error.rb +117 -0
  93. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_error_category.rb +19 -0
  94. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_error_code.rb +23 -0
  95. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_error_detail.rb +59 -0
  96. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_input.rb +65 -0
  97. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_input_asset.rb +85 -0
  98. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_input_clip.rb +77 -0
  99. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_input_http.rb +87 -0
  100. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_inputs.rb +80 -0
  101. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_output.rb +90 -0
  102. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_output_asset.rb +90 -0
  103. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_retry.rb +16 -0
  104. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/job_state.rb +21 -0
  105. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/jpg_format.rb +58 -0
  106. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/jpg_image.rb +121 -0
  107. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/jpg_layer.rb +86 -0
  108. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/layer.rb +93 -0
  109. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/list_container_sas_input.rb +60 -0
  110. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/list_content_keys_response.rb +56 -0
  111. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/list_paths_response.rb +76 -0
  112. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event.rb +227 -0
  113. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_action_input.rb +46 -0
  114. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_encoding.rb +59 -0
  115. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_encoding_type.rb +16 -0
  116. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_endpoint.rb +57 -0
  117. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_input.rb +92 -0
  118. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_input_protocol.rb +16 -0
  119. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_list_result.rb +110 -0
  120. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_preview.rb +107 -0
  121. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_preview_access_control.rb +47 -0
  122. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_event_resource_state.rb +19 -0
  123. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_output.rb +181 -0
  124. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_output_list_result.rb +111 -0
  125. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/live_output_resource_state.rb +17 -0
  126. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/location.rb +47 -0
  127. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/media_service.rb +118 -0
  128. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/media_service_collection.rb +99 -0
  129. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/mp4format.rb +75 -0
  130. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/multi_bitrate_format.rb +84 -0
  131. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/no_encryption.rb +47 -0
  132. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/odata_error.rb +89 -0
  133. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/on_error_type.rb +16 -0
  134. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/operation.rb +58 -0
  135. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/operation_collection.rb +99 -0
  136. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/operation_display.rb +79 -0
  137. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/output_file.rb +59 -0
  138. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/overlay.rb +132 -0
  139. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/png_format.rb +58 -0
  140. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/png_image.rb +121 -0
  141. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/png_layer.rb +74 -0
  142. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/preset.rb +50 -0
  143. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/priority.rb +17 -0
  144. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/provider.rb +46 -0
  145. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/proxy_resource.rb +62 -0
  146. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/rectangle.rb +88 -0
  147. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/resource.rb +71 -0
  148. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/rotation.rb +20 -0
  149. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/standard_encoder_preset.rb +110 -0
  150. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/storage_account.rb +63 -0
  151. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/storage_account_type.rb +16 -0
  152. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/stream_options_flag.rb +16 -0
  153. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_endpoint.rb +284 -0
  154. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_endpoint_access_control.rb +60 -0
  155. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_endpoint_list_result.rb +111 -0
  156. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_endpoint_resource_state.rb +20 -0
  157. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_entity_scale_unit.rb +47 -0
  158. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_locator.rb +185 -0
  159. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_locator_collection.rb +100 -0
  160. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_locator_content_key.rb +115 -0
  161. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_locator_content_key_type.rb +17 -0
  162. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_path.rb +82 -0
  163. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_policy.rb +133 -0
  164. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_policy_collection.rb +99 -0
  165. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_policy_content_key.rb +78 -0
  166. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_policy_content_keys.rb +68 -0
  167. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_policy_fair_play_configuration.rb +59 -0
  168. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_policy_play_ready_configuration.rb +59 -0
  169. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_policy_streaming_protocol.rb +18 -0
  170. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/streaming_policy_widevine_configuration.rb +48 -0
  171. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/stretch_mode.rb +17 -0
  172. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/subscription_media_service.rb +118 -0
  173. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/subscription_media_service_collection.rb +100 -0
  174. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb +46 -0
  175. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/track_property_compare_operation.rb +16 -0
  176. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/track_property_condition.rb +72 -0
  177. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/track_property_type.rb +16 -0
  178. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/track_selection.rb +56 -0
  179. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/tracked_resource.rb +92 -0
  180. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/transform.rb +123 -0
  181. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/transform_collection.rb +99 -0
  182. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/transform_output.rb +83 -0
  183. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/transport_stream_format.rb +76 -0
  184. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/video.rb +86 -0
  185. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/video_analyzer_preset.rb +71 -0
  186. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/video_layer.rb +156 -0
  187. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/models/video_overlay.rb +136 -0
  188. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/module_definition.rb +9 -0
  189. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/operations.rb +229 -0
  190. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/streaming_endpoints.rb +1308 -0
  191. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/streaming_locators.rb +794 -0
  192. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/streaming_policies.rb +584 -0
  193. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/transforms.rb +714 -0
  194. data/lib/azure_mgmt_media_services.rb +1 -0
  195. data/lib/profiles/latest/modules/mediaservices_profile_module.rb +412 -416
  196. data/lib/version.rb +1 -1
  197. metadata +192 -4
@@ -0,0 +1,136 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::MediaServices::Mgmt::V2018_06_01_preview
7
+ module Models
8
+ #
9
+ # Describes the properties of a video overlay.
10
+ #
11
+ class VideoOverlay < Overlay
12
+
13
+ include MsRestAzure
14
+
15
+
16
+ def initialize
17
+ @odatatype = "#Microsoft.Media.VideoOverlay"
18
+ end
19
+
20
+ attr_accessor :odatatype
21
+
22
+ # @return [Rectangle] The location in the input video where the overlay
23
+ # is applied.
24
+ attr_accessor :position
25
+
26
+ # @return [Float] The opacity of the overlay. This is a value in the
27
+ # range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque.
28
+ attr_accessor :opacity
29
+
30
+ # @return [Rectangle] An optional rectangular window used to crop the
31
+ # overlay image or video.
32
+ attr_accessor :crop_rectangle
33
+
34
+
35
+ #
36
+ # Mapper for VideoOverlay class as Ruby Hash.
37
+ # This will be used for serialization/deserialization.
38
+ #
39
+ def self.mapper()
40
+ {
41
+ client_side_validation: true,
42
+ required: false,
43
+ serialized_name: '#Microsoft.Media.VideoOverlay',
44
+ type: {
45
+ name: 'Composite',
46
+ class_name: 'VideoOverlay',
47
+ model_properties: {
48
+ input_label: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ serialized_name: 'inputLabel',
52
+ type: {
53
+ name: 'String'
54
+ }
55
+ },
56
+ start: {
57
+ client_side_validation: true,
58
+ required: false,
59
+ serialized_name: 'start',
60
+ type: {
61
+ name: 'TimeSpan'
62
+ }
63
+ },
64
+ end_property: {
65
+ client_side_validation: true,
66
+ required: false,
67
+ serialized_name: 'end',
68
+ type: {
69
+ name: 'TimeSpan'
70
+ }
71
+ },
72
+ fade_in_duration: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ serialized_name: 'fadeInDuration',
76
+ type: {
77
+ name: 'TimeSpan'
78
+ }
79
+ },
80
+ fade_out_duration: {
81
+ client_side_validation: true,
82
+ required: false,
83
+ serialized_name: 'fadeOutDuration',
84
+ type: {
85
+ name: 'TimeSpan'
86
+ }
87
+ },
88
+ audio_gain_level: {
89
+ client_side_validation: true,
90
+ required: false,
91
+ serialized_name: 'audioGainLevel',
92
+ type: {
93
+ name: 'Double'
94
+ }
95
+ },
96
+ odatatype: {
97
+ client_side_validation: true,
98
+ required: true,
99
+ serialized_name: '@odata\\.type',
100
+ type: {
101
+ name: 'String'
102
+ }
103
+ },
104
+ position: {
105
+ client_side_validation: true,
106
+ required: false,
107
+ serialized_name: 'position',
108
+ type: {
109
+ name: 'Composite',
110
+ class_name: 'Rectangle'
111
+ }
112
+ },
113
+ opacity: {
114
+ client_side_validation: true,
115
+ required: false,
116
+ serialized_name: 'opacity',
117
+ type: {
118
+ name: 'Double'
119
+ }
120
+ },
121
+ crop_rectangle: {
122
+ client_side_validation: true,
123
+ required: false,
124
+ serialized_name: 'cropRectangle',
125
+ type: {
126
+ name: 'Composite',
127
+ class_name: 'Rectangle'
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ end
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::MediaServices end
8
+ module Azure::MediaServices::Mgmt end
9
+ module Azure::MediaServices::Mgmt::V2018_06_01_preview end
@@ -0,0 +1,229 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::MediaServices::Mgmt::V2018_06_01_preview
7
+ #
8
+ # Operations
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AzureMediaServices] reference to the AzureMediaServices
22
+ attr_reader :client
23
+
24
+ #
25
+ # List Operations
26
+ #
27
+ # Lists all the Media Services operations.
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<Operation>] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ first_page = list_as_lazy(custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # List Operations
41
+ #
42
+ # Lists all the Media Services operations.
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # List Operations
55
+ #
56
+ # Lists all the Media Services operations.
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+
66
+
67
+ request_headers = {}
68
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
69
+
70
+ # Set Headers
71
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
72
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
73
+ path_template = 'providers/Microsoft.Media/operations'
74
+
75
+ request_url = @base_url || @client.base_url
76
+
77
+ options = {
78
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ # Deserialize Response
96
+ if status_code == 200
97
+ begin
98
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
+ result_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::OperationCollection.mapper()
100
+ result.body = @client.deserialize(result_mapper, parsed_response)
101
+ rescue Exception => e
102
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
103
+ end
104
+ end
105
+
106
+ result
107
+ end
108
+
109
+ promise.execute
110
+ end
111
+
112
+ #
113
+ # List Operations
114
+ #
115
+ # Lists all the Media Services operations.
116
+ #
117
+ # @param next_page_link [String] The NextLink from the previous successful call
118
+ # to List operation.
119
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
120
+ # will be added to the HTTP request.
121
+ #
122
+ # @return [OperationCollection] operation results.
123
+ #
124
+ def list_next(next_page_link, custom_headers:nil)
125
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
126
+ response.body unless response.nil?
127
+ end
128
+
129
+ #
130
+ # List Operations
131
+ #
132
+ # Lists all the Media Services operations.
133
+ #
134
+ # @param next_page_link [String] The NextLink from the previous successful call
135
+ # to List operation.
136
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
137
+ # will be added to the HTTP request.
138
+ #
139
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
140
+ #
141
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
142
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
143
+ end
144
+
145
+ #
146
+ # List Operations
147
+ #
148
+ # Lists all the Media Services operations.
149
+ #
150
+ # @param next_page_link [String] The NextLink from the previous successful call
151
+ # to List operation.
152
+ # @param [Hash{String => String}] A hash of custom headers that will be added
153
+ # to the HTTP request.
154
+ #
155
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
156
+ #
157
+ def list_next_async(next_page_link, custom_headers:nil)
158
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
159
+
160
+
161
+ request_headers = {}
162
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
163
+
164
+ # Set Headers
165
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
166
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
167
+ path_template = '{nextLink}'
168
+
169
+ request_url = @base_url || @client.base_url
170
+
171
+ options = {
172
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
173
+ skip_encoding_path_params: {'nextLink' => next_page_link},
174
+ headers: request_headers.merge(custom_headers || {}),
175
+ base_url: request_url
176
+ }
177
+ promise = @client.make_request_async(:get, path_template, options)
178
+
179
+ promise = promise.then do |result|
180
+ http_response = result.response
181
+ status_code = http_response.status
182
+ response_content = http_response.body
183
+ unless status_code == 200
184
+ error_model = JSON.load(response_content)
185
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
186
+ end
187
+
188
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
189
+ # Deserialize Response
190
+ if status_code == 200
191
+ begin
192
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
193
+ result_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::OperationCollection.mapper()
194
+ result.body = @client.deserialize(result_mapper, parsed_response)
195
+ rescue Exception => e
196
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
197
+ end
198
+ end
199
+
200
+ result
201
+ end
202
+
203
+ promise.execute
204
+ end
205
+
206
+ #
207
+ # List Operations
208
+ #
209
+ # Lists all the Media Services operations.
210
+ #
211
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
212
+ # will be added to the HTTP request.
213
+ #
214
+ # @return [OperationCollection] which provide lazy access to pages of the
215
+ # response.
216
+ #
217
+ def list_as_lazy(custom_headers:nil)
218
+ response = list_async(custom_headers:custom_headers).value!
219
+ unless response.nil?
220
+ page = response.body
221
+ page.next_method = Proc.new do |next_page_link|
222
+ list_next_async(next_page_link, custom_headers:custom_headers)
223
+ end
224
+ page
225
+ end
226
+ end
227
+
228
+ end
229
+ end
@@ -0,0 +1,1308 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::MediaServices::Mgmt::V2018_06_01_preview
7
+ #
8
+ # StreamingEndpoints
9
+ #
10
+ class StreamingEndpoints
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the StreamingEndpoints 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 StreamingEndpoints
26
+ #
27
+ # Lists the StreamingEndpoints 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<StreamingEndpoint>] 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 StreamingEndpoints
44
+ #
45
+ # Lists the StreamingEndpoints 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 StreamingEndpoints
61
+ #
62
+ # Lists the StreamingEndpoints 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}/streamingEndpoints'
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
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::StreamingEndpointListResult.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Get StreamingEndpoint
127
+ #
128
+ # Gets a StreamingEndpoint.
129
+ #
130
+ # @param resource_group_name [String] The name of the resource group within the
131
+ # Azure subscription.
132
+ # @param account_name [String] The Media Services account name.
133
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
+ # will be added to the HTTP request.
136
+ #
137
+ # @return [StreamingEndpoint] operation results.
138
+ #
139
+ def get(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
140
+ response = get_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
141
+ response.body unless response.nil?
142
+ end
143
+
144
+ #
145
+ # Get StreamingEndpoint
146
+ #
147
+ # Gets a StreamingEndpoint.
148
+ #
149
+ # @param resource_group_name [String] The name of the resource group within the
150
+ # Azure subscription.
151
+ # @param account_name [String] The Media Services account name.
152
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
157
+ #
158
+ def get_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
159
+ get_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
160
+ end
161
+
162
+ #
163
+ # Get StreamingEndpoint
164
+ #
165
+ # Gets a StreamingEndpoint.
166
+ #
167
+ # @param resource_group_name [String] The name of the resource group within the
168
+ # Azure subscription.
169
+ # @param account_name [String] The Media Services account name.
170
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
171
+ # @param [Hash{String => String}] A hash of custom headers that will be added
172
+ # to the HTTP request.
173
+ #
174
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
175
+ #
176
+ def get_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
177
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
178
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
179
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
180
+ fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil?
181
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24
182
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1
183
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
184
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
185
+
186
+
187
+ request_headers = {}
188
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
189
+
190
+ # Set Headers
191
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
192
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
193
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}'
194
+
195
+ request_url = @base_url || @client.base_url
196
+
197
+ options = {
198
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
199
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name},
200
+ query_params: {'api-version' => @client.api_version},
201
+ headers: request_headers.merge(custom_headers || {}),
202
+ base_url: request_url
203
+ }
204
+ promise = @client.make_request_async(:get, path_template, options)
205
+
206
+ promise = promise.then do |result|
207
+ http_response = result.response
208
+ status_code = http_response.status
209
+ response_content = http_response.body
210
+ unless status_code == 200 || status_code == 404
211
+ error_model = JSON.load(response_content)
212
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
213
+ end
214
+
215
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
216
+ # Deserialize Response
217
+ if status_code == 200
218
+ begin
219
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
220
+ result_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::StreamingEndpoint.mapper()
221
+ result.body = @client.deserialize(result_mapper, parsed_response)
222
+ rescue Exception => e
223
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
224
+ end
225
+ end
226
+
227
+ result
228
+ end
229
+
230
+ promise.execute
231
+ end
232
+
233
+ #
234
+ # Create StreamingEndpoint
235
+ #
236
+ # Creates a StreamingEndpoint.
237
+ #
238
+ # @param resource_group_name [String] The name of the resource group within the
239
+ # Azure subscription.
240
+ # @param account_name [String] The Media Services account name.
241
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
242
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
243
+ # creation.
244
+ # @param auto_start [Boolean] The flag indicates if auto start the Live Event.
245
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
246
+ # will be added to the HTTP request.
247
+ #
248
+ # @return [StreamingEndpoint] operation results.
249
+ #
250
+ def create(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
251
+ response = create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value!
252
+ response.body unless response.nil?
253
+ end
254
+
255
+ #
256
+ # @param resource_group_name [String] The name of the resource group within the
257
+ # Azure subscription.
258
+ # @param account_name [String] The Media Services account name.
259
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
260
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
261
+ # creation.
262
+ # @param auto_start [Boolean] The flag indicates if auto start the Live Event.
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ # @return [Concurrent::Promise] promise which provides async access to http
267
+ # response.
268
+ #
269
+ def create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
270
+ # Send request
271
+ promise = begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers)
272
+
273
+ promise = promise.then do |response|
274
+ # Defining deserialization method.
275
+ deserialize_method = lambda do |parsed_response|
276
+ result_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::StreamingEndpoint.mapper()
277
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
278
+ end
279
+
280
+ # Waiting for response.
281
+ @client.get_long_running_operation_result(response, deserialize_method)
282
+ end
283
+
284
+ promise
285
+ end
286
+
287
+ #
288
+ # Update StreamingEndpoint
289
+ #
290
+ # Updates a existing StreamingEndpoint.
291
+ #
292
+ # @param resource_group_name [String] The name of the resource group within the
293
+ # Azure subscription.
294
+ # @param account_name [String] The Media Services account name.
295
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
296
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
297
+ # creation.
298
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
299
+ # will be added to the HTTP request.
300
+ #
301
+ # @return [StreamingEndpoint] operation results.
302
+ #
303
+ def update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
304
+ response = update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value!
305
+ response.body unless response.nil?
306
+ end
307
+
308
+ #
309
+ # @param resource_group_name [String] The name of the resource group within the
310
+ # Azure subscription.
311
+ # @param account_name [String] The Media Services account name.
312
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
313
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
314
+ # 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, streaming_endpoint_name, parameters, custom_headers:nil)
322
+ # Send request
323
+ promise = begin_update_async(resource_group_name, account_name, streaming_endpoint_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::V2018_06_01_preview::Models::StreamingEndpoint.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 StreamingEndpoint
341
+ #
342
+ # Deletes a StreamingEndpoint.
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 streaming_endpoint_name [String] The name of the StreamingEndpoint.
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, streaming_endpoint_name, custom_headers:nil)
352
+ response = delete_async(resource_group_name, account_name, streaming_endpoint_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 streaming_endpoint_name [String] The name of the StreamingEndpoint.
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, streaming_endpoint_name, custom_headers:nil)
368
+ # Send request
369
+ promise = begin_delete_async(resource_group_name, account_name, streaming_endpoint_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 StreamingEndpoint
385
+ #
386
+ # Starts an existing StreamingEndpoint.
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 streaming_endpoint_name [String] The name of the StreamingEndpoint.
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, streaming_endpoint_name, custom_headers:nil)
396
+ response = start_async(resource_group_name, account_name, streaming_endpoint_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 streaming_endpoint_name [String] The name of the StreamingEndpoint.
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, streaming_endpoint_name, custom_headers:nil)
412
+ # Send request
413
+ promise = begin_start_async(resource_group_name, account_name, streaming_endpoint_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 StreamingEndpoint
429
+ #
430
+ # Stops an existing StreamingEndpoint.
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 streaming_endpoint_name [String] The name of the StreamingEndpoint.
436
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
437
+ # will be added to the HTTP request.
438
+ #
439
+ def stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
440
+ response = stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
441
+ nil
442
+ end
443
+
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 streaming_endpoint_name [String] The name of the StreamingEndpoint.
449
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
450
+ # will be added to the HTTP request.
451
+ #
452
+ # @return [Concurrent::Promise] promise which provides async access to http
453
+ # response.
454
+ #
455
+ def stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
456
+ # Send request
457
+ promise = begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers)
458
+
459
+ promise = promise.then do |response|
460
+ # Defining deserialization method.
461
+ deserialize_method = lambda do |parsed_response|
462
+ end
463
+
464
+ # Waiting for response.
465
+ @client.get_long_running_operation_result(response, deserialize_method)
466
+ end
467
+
468
+ promise
469
+ end
470
+
471
+ #
472
+ # Scale StreamingEndpoint
473
+ #
474
+ # Scales an existing StreamingEndpoint.
475
+ #
476
+ # @param resource_group_name [String] The name of the resource group within the
477
+ # Azure subscription.
478
+ # @param account_name [String] The Media Services account name.
479
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
480
+ # @param parameters [StreamingEntityScaleUnit] StreamingEndpoint scale
481
+ # parameters
482
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
483
+ # will be added to the HTTP request.
484
+ #
485
+ def scale(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
486
+ response = scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, 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 streaming_endpoint_name [String] The name of the StreamingEndpoint.
495
+ # @param parameters [StreamingEntityScaleUnit] StreamingEndpoint scale
496
+ # parameters
497
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
498
+ # will be added to the HTTP request.
499
+ #
500
+ # @return [Concurrent::Promise] promise which provides async access to http
501
+ # response.
502
+ #
503
+ def scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
504
+ # Send request
505
+ promise = begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers)
506
+
507
+ promise = promise.then do |response|
508
+ # Defining deserialization method.
509
+ deserialize_method = lambda do |parsed_response|
510
+ end
511
+
512
+ # Waiting for response.
513
+ @client.get_long_running_operation_result(response, deserialize_method)
514
+ end
515
+
516
+ promise
517
+ end
518
+
519
+ #
520
+ # Create StreamingEndpoint
521
+ #
522
+ # Creates a StreamingEndpoint.
523
+ #
524
+ # @param resource_group_name [String] The name of the resource group within the
525
+ # Azure subscription.
526
+ # @param account_name [String] The Media Services account name.
527
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
528
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
529
+ # creation.
530
+ # @param auto_start [Boolean] The flag indicates if auto start the Live Event.
531
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
532
+ # will be added to the HTTP request.
533
+ #
534
+ # @return [StreamingEndpoint] operation results.
535
+ #
536
+ def begin_create(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
537
+ response = begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value!
538
+ response.body unless response.nil?
539
+ end
540
+
541
+ #
542
+ # Create StreamingEndpoint
543
+ #
544
+ # Creates a StreamingEndpoint.
545
+ #
546
+ # @param resource_group_name [String] The name of the resource group within the
547
+ # Azure subscription.
548
+ # @param account_name [String] The Media Services account name.
549
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
550
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
551
+ # creation.
552
+ # @param auto_start [Boolean] The flag indicates if auto start the Live Event.
553
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
554
+ # will be added to the HTTP request.
555
+ #
556
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
557
+ #
558
+ def begin_create_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
559
+ begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:auto_start, custom_headers:custom_headers).value!
560
+ end
561
+
562
+ #
563
+ # Create StreamingEndpoint
564
+ #
565
+ # Creates a StreamingEndpoint.
566
+ #
567
+ # @param resource_group_name [String] The name of the resource group within the
568
+ # Azure subscription.
569
+ # @param account_name [String] The Media Services account name.
570
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
571
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
572
+ # creation.
573
+ # @param auto_start [Boolean] The flag indicates if auto start the Live Event.
574
+ # @param [Hash{String => String}] A hash of custom headers that will be added
575
+ # to the HTTP request.
576
+ #
577
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
578
+ #
579
+ def begin_create_async(resource_group_name, account_name, streaming_endpoint_name, parameters, auto_start:nil, custom_headers:nil)
580
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
581
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
582
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
583
+ fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil?
584
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24
585
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1
586
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
587
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
588
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
589
+
590
+
591
+ request_headers = {}
592
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
593
+
594
+ # Set Headers
595
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
596
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
597
+
598
+ # Serialize Request
599
+ request_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::StreamingEndpoint.mapper()
600
+ request_content = @client.serialize(request_mapper, parameters)
601
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
602
+
603
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}'
604
+
605
+ request_url = @base_url || @client.base_url
606
+
607
+ options = {
608
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
609
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name},
610
+ query_params: {'api-version' => @client.api_version,'autoStart' => auto_start},
611
+ body: request_content,
612
+ headers: request_headers.merge(custom_headers || {}),
613
+ base_url: request_url
614
+ }
615
+ promise = @client.make_request_async(:put, path_template, options)
616
+
617
+ promise = promise.then do |result|
618
+ http_response = result.response
619
+ status_code = http_response.status
620
+ response_content = http_response.body
621
+ unless status_code == 200 || status_code == 202
622
+ error_model = JSON.load(response_content)
623
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
624
+ end
625
+
626
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-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::V2018_06_01_preview::Models::StreamingEndpoint.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::V2018_06_01_preview::Models::StreamingEndpoint.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
+ # Update StreamingEndpoint
656
+ #
657
+ # Updates a existing StreamingEndpoint.
658
+ #
659
+ # @param resource_group_name [String] The name of the resource group within the
660
+ # Azure subscription.
661
+ # @param account_name [String] The Media Services account name.
662
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
663
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
664
+ # creation.
665
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
666
+ # will be added to the HTTP request.
667
+ #
668
+ # @return [StreamingEndpoint] operation results.
669
+ #
670
+ def begin_update(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
671
+ response = begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value!
672
+ response.body unless response.nil?
673
+ end
674
+
675
+ #
676
+ # Update StreamingEndpoint
677
+ #
678
+ # Updates a existing StreamingEndpoint.
679
+ #
680
+ # @param resource_group_name [String] The name of the resource group within the
681
+ # Azure subscription.
682
+ # @param account_name [String] The Media Services account name.
683
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
684
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
685
+ # creation.
686
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
687
+ # will be added to the HTTP request.
688
+ #
689
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
690
+ #
691
+ def begin_update_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
692
+ begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value!
693
+ end
694
+
695
+ #
696
+ # Update StreamingEndpoint
697
+ #
698
+ # Updates a existing StreamingEndpoint.
699
+ #
700
+ # @param resource_group_name [String] The name of the resource group within the
701
+ # Azure subscription.
702
+ # @param account_name [String] The Media Services account name.
703
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
704
+ # @param parameters [StreamingEndpoint] StreamingEndpoint properties needed for
705
+ # creation.
706
+ # @param [Hash{String => String}] A hash of custom headers that will be added
707
+ # to the HTTP request.
708
+ #
709
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
710
+ #
711
+ def begin_update_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
712
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
713
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
714
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
715
+ fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil?
716
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24
717
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1
718
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
719
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
720
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
721
+
722
+
723
+ request_headers = {}
724
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
725
+
726
+ # Set Headers
727
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
728
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
729
+
730
+ # Serialize Request
731
+ request_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::StreamingEndpoint.mapper()
732
+ request_content = @client.serialize(request_mapper, parameters)
733
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
734
+
735
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}'
736
+
737
+ request_url = @base_url || @client.base_url
738
+
739
+ options = {
740
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
741
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name},
742
+ query_params: {'api-version' => @client.api_version},
743
+ body: request_content,
744
+ headers: request_headers.merge(custom_headers || {}),
745
+ base_url: request_url
746
+ }
747
+ promise = @client.make_request_async(:patch, path_template, options)
748
+
749
+ promise = promise.then do |result|
750
+ http_response = result.response
751
+ status_code = http_response.status
752
+ response_content = http_response.body
753
+ unless status_code == 200 || status_code == 202
754
+ error_model = JSON.load(response_content)
755
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
756
+ end
757
+
758
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
759
+ # Deserialize Response
760
+ if status_code == 200
761
+ begin
762
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
763
+ result_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::StreamingEndpoint.mapper()
764
+ result.body = @client.deserialize(result_mapper, parsed_response)
765
+ rescue Exception => e
766
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
767
+ end
768
+ end
769
+ # Deserialize Response
770
+ if status_code == 202
771
+ begin
772
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
773
+ result_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::StreamingEndpoint.mapper()
774
+ result.body = @client.deserialize(result_mapper, parsed_response)
775
+ rescue Exception => e
776
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
777
+ end
778
+ end
779
+
780
+ result
781
+ end
782
+
783
+ promise.execute
784
+ end
785
+
786
+ #
787
+ # Delete StreamingEndpoint
788
+ #
789
+ # Deletes a StreamingEndpoint.
790
+ #
791
+ # @param resource_group_name [String] The name of the resource group within the
792
+ # Azure subscription.
793
+ # @param account_name [String] The Media Services account name.
794
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
795
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
796
+ # will be added to the HTTP request.
797
+ #
798
+ #
799
+ def begin_delete(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
800
+ response = begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
801
+ nil
802
+ end
803
+
804
+ #
805
+ # Delete StreamingEndpoint
806
+ #
807
+ # Deletes a StreamingEndpoint.
808
+ #
809
+ # @param resource_group_name [String] The name of the resource group within the
810
+ # Azure subscription.
811
+ # @param account_name [String] The Media Services account name.
812
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
813
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
814
+ # will be added to the HTTP request.
815
+ #
816
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
817
+ #
818
+ def begin_delete_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
819
+ begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
820
+ end
821
+
822
+ #
823
+ # Delete StreamingEndpoint
824
+ #
825
+ # Deletes a StreamingEndpoint.
826
+ #
827
+ # @param resource_group_name [String] The name of the resource group within the
828
+ # Azure subscription.
829
+ # @param account_name [String] The Media Services account name.
830
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
831
+ # @param [Hash{String => String}] A hash of custom headers that will be added
832
+ # to the HTTP request.
833
+ #
834
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
835
+ #
836
+ def begin_delete_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
837
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
838
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
839
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
840
+ fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil?
841
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24
842
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1
843
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
844
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
845
+
846
+
847
+ request_headers = {}
848
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
849
+
850
+ # Set Headers
851
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
852
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
853
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}'
854
+
855
+ request_url = @base_url || @client.base_url
856
+
857
+ options = {
858
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
859
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name},
860
+ query_params: {'api-version' => @client.api_version},
861
+ headers: request_headers.merge(custom_headers || {}),
862
+ base_url: request_url
863
+ }
864
+ promise = @client.make_request_async(:delete, path_template, options)
865
+
866
+ promise = promise.then do |result|
867
+ http_response = result.response
868
+ status_code = http_response.status
869
+ response_content = http_response.body
870
+ unless status_code == 200 || status_code == 202 || status_code == 204
871
+ error_model = JSON.load(response_content)
872
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
873
+ end
874
+
875
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
876
+
877
+ result
878
+ end
879
+
880
+ promise.execute
881
+ end
882
+
883
+ #
884
+ # Start StreamingEndpoint
885
+ #
886
+ # Starts an existing StreamingEndpoint.
887
+ #
888
+ # @param resource_group_name [String] The name of the resource group within the
889
+ # Azure subscription.
890
+ # @param account_name [String] The Media Services account name.
891
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
892
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
893
+ # will be added to the HTTP request.
894
+ #
895
+ #
896
+ def begin_start(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
897
+ response = begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
898
+ nil
899
+ end
900
+
901
+ #
902
+ # Start StreamingEndpoint
903
+ #
904
+ # Starts an existing StreamingEndpoint.
905
+ #
906
+ # @param resource_group_name [String] The name of the resource group within the
907
+ # Azure subscription.
908
+ # @param account_name [String] The Media Services account name.
909
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
910
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
911
+ # will be added to the HTTP request.
912
+ #
913
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
914
+ #
915
+ def begin_start_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
916
+ begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
917
+ end
918
+
919
+ #
920
+ # Start StreamingEndpoint
921
+ #
922
+ # Starts an existing StreamingEndpoint.
923
+ #
924
+ # @param resource_group_name [String] The name of the resource group within the
925
+ # Azure subscription.
926
+ # @param account_name [String] The Media Services account name.
927
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
928
+ # @param [Hash{String => String}] A hash of custom headers that will be added
929
+ # to the HTTP request.
930
+ #
931
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
932
+ #
933
+ def begin_start_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
934
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
935
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
936
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
937
+ fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil?
938
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24
939
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1
940
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
941
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
942
+
943
+
944
+ request_headers = {}
945
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
946
+
947
+ # Set Headers
948
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
949
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
950
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/start'
951
+
952
+ request_url = @base_url || @client.base_url
953
+
954
+ options = {
955
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
956
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name},
957
+ query_params: {'api-version' => @client.api_version},
958
+ headers: request_headers.merge(custom_headers || {}),
959
+ base_url: request_url
960
+ }
961
+ promise = @client.make_request_async(:post, path_template, options)
962
+
963
+ promise = promise.then do |result|
964
+ http_response = result.response
965
+ status_code = http_response.status
966
+ response_content = http_response.body
967
+ unless status_code == 200 || status_code == 202
968
+ error_model = JSON.load(response_content)
969
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
970
+ end
971
+
972
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
973
+
974
+ result
975
+ end
976
+
977
+ promise.execute
978
+ end
979
+
980
+ #
981
+ # Stop StreamingEndpoint
982
+ #
983
+ # Stops an existing StreamingEndpoint.
984
+ #
985
+ # @param resource_group_name [String] The name of the resource group within the
986
+ # Azure subscription.
987
+ # @param account_name [String] The Media Services account name.
988
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
989
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
990
+ # will be added to the HTTP request.
991
+ #
992
+ #
993
+ def begin_stop(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
994
+ response = begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
995
+ nil
996
+ end
997
+
998
+ #
999
+ # Stop StreamingEndpoint
1000
+ #
1001
+ # Stops an existing StreamingEndpoint.
1002
+ #
1003
+ # @param resource_group_name [String] The name of the resource group within the
1004
+ # Azure subscription.
1005
+ # @param account_name [String] The Media Services account name.
1006
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
1007
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1008
+ # will be added to the HTTP request.
1009
+ #
1010
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1011
+ #
1012
+ def begin_stop_with_http_info(resource_group_name, account_name, streaming_endpoint_name, custom_headers:nil)
1013
+ begin_stop_async(resource_group_name, account_name, streaming_endpoint_name, custom_headers:custom_headers).value!
1014
+ end
1015
+
1016
+ #
1017
+ # Stop StreamingEndpoint
1018
+ #
1019
+ # Stops an existing StreamingEndpoint.
1020
+ #
1021
+ # @param resource_group_name [String] The name of the resource group within the
1022
+ # Azure subscription.
1023
+ # @param account_name [String] The Media Services account name.
1024
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
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, streaming_endpoint_name, 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, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil?
1035
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24
1036
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1
1037
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
1038
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1039
+
1040
+
1041
+ request_headers = {}
1042
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1043
+
1044
+ # Set Headers
1045
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1046
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1047
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/stop'
1048
+
1049
+ request_url = @base_url || @client.base_url
1050
+
1051
+ options = {
1052
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1053
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name},
1054
+ query_params: {'api-version' => @client.api_version},
1055
+ headers: request_headers.merge(custom_headers || {}),
1056
+ base_url: request_url
1057
+ }
1058
+ promise = @client.make_request_async(:post, path_template, options)
1059
+
1060
+ promise = promise.then do |result|
1061
+ http_response = result.response
1062
+ status_code = http_response.status
1063
+ response_content = http_response.body
1064
+ unless status_code == 200 || status_code == 202
1065
+ error_model = JSON.load(response_content)
1066
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1067
+ end
1068
+
1069
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1070
+
1071
+ result
1072
+ end
1073
+
1074
+ promise.execute
1075
+ end
1076
+
1077
+ #
1078
+ # Scale StreamingEndpoint
1079
+ #
1080
+ # Scales an existing StreamingEndpoint.
1081
+ #
1082
+ # @param resource_group_name [String] The name of the resource group within the
1083
+ # Azure subscription.
1084
+ # @param account_name [String] The Media Services account name.
1085
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
1086
+ # @param parameters [StreamingEntityScaleUnit] StreamingEndpoint scale
1087
+ # parameters
1088
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1089
+ # will be added to the HTTP request.
1090
+ #
1091
+ #
1092
+ def begin_scale(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
1093
+ response = begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value!
1094
+ nil
1095
+ end
1096
+
1097
+ #
1098
+ # Scale StreamingEndpoint
1099
+ #
1100
+ # Scales an existing StreamingEndpoint.
1101
+ #
1102
+ # @param resource_group_name [String] The name of the resource group within the
1103
+ # Azure subscription.
1104
+ # @param account_name [String] The Media Services account name.
1105
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
1106
+ # @param parameters [StreamingEntityScaleUnit] StreamingEndpoint scale
1107
+ # parameters
1108
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1109
+ # will be added to the HTTP request.
1110
+ #
1111
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1112
+ #
1113
+ def begin_scale_with_http_info(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
1114
+ begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:custom_headers).value!
1115
+ end
1116
+
1117
+ #
1118
+ # Scale StreamingEndpoint
1119
+ #
1120
+ # Scales an existing StreamingEndpoint.
1121
+ #
1122
+ # @param resource_group_name [String] The name of the resource group within the
1123
+ # Azure subscription.
1124
+ # @param account_name [String] The Media Services account name.
1125
+ # @param streaming_endpoint_name [String] The name of the StreamingEndpoint.
1126
+ # @param parameters [StreamingEntityScaleUnit] StreamingEndpoint scale
1127
+ # parameters
1128
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1129
+ # to the HTTP request.
1130
+ #
1131
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1132
+ #
1133
+ def begin_scale_async(resource_group_name, account_name, streaming_endpoint_name, parameters, custom_headers:nil)
1134
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1135
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1136
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1137
+ fail ArgumentError, 'streaming_endpoint_name is nil' if streaming_endpoint_name.nil?
1138
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MaxLength': '24'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length > 24
1139
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.length < 1
1140
+ fail ArgumentError, "'streaming_endpoint_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$'" if !streaming_endpoint_name.nil? && streaming_endpoint_name.match(Regexp.new('^^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$$')).nil?
1141
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1142
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1143
+
1144
+
1145
+ request_headers = {}
1146
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1147
+
1148
+ # Set Headers
1149
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1150
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1151
+
1152
+ # Serialize Request
1153
+ request_mapper = Azure::MediaServices::Mgmt::V2018_06_01_preview::Models::StreamingEntityScaleUnit.mapper()
1154
+ request_content = @client.serialize(request_mapper, parameters)
1155
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1156
+
1157
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/scale'
1158
+
1159
+ request_url = @base_url || @client.base_url
1160
+
1161
+ options = {
1162
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1163
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'streamingEndpointName' => streaming_endpoint_name},
1164
+ query_params: {'api-version' => @client.api_version},
1165
+ body: request_content,
1166
+ headers: request_headers.merge(custom_headers || {}),
1167
+ base_url: request_url
1168
+ }
1169
+ promise = @client.make_request_async(:post, path_template, options)
1170
+
1171
+ promise = promise.then do |result|
1172
+ http_response = result.response
1173
+ status_code = http_response.status
1174
+ response_content = http_response.body
1175
+ unless status_code == 200 || status_code == 202
1176
+ error_model = JSON.load(response_content)
1177
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1178
+ end
1179
+
1180
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1181
+
1182
+ result
1183
+ end
1184
+
1185
+ promise.execute
1186
+ end
1187
+
1188
+ #
1189
+ # List StreamingEndpoints
1190
+ #
1191
+ # Lists the StreamingEndpoints in the account.
1192
+ #
1193
+ # @param next_page_link [String] The NextLink from the previous successful call
1194
+ # to List operation.
1195
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1196
+ # will be added to the HTTP request.
1197
+ #
1198
+ # @return [StreamingEndpointListResult] operation results.
1199
+ #
1200
+ def list_next(next_page_link, custom_headers:nil)
1201
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1202
+ response.body unless response.nil?
1203
+ end
1204
+
1205
+ #
1206
+ # List StreamingEndpoints
1207
+ #
1208
+ # Lists the StreamingEndpoints in the account.
1209
+ #
1210
+ # @param next_page_link [String] The NextLink from the previous successful call
1211
+ # to List operation.
1212
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1213
+ # will be added to the HTTP request.
1214
+ #
1215
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1216
+ #
1217
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1218
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1219
+ end
1220
+
1221
+ #
1222
+ # List StreamingEndpoints
1223
+ #
1224
+ # Lists the StreamingEndpoints in the account.
1225
+ #
1226
+ # @param next_page_link [String] The NextLink from the previous successful call
1227
+ # to List operation.
1228
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1229
+ # to the HTTP request.
1230
+ #
1231
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1232
+ #
1233
+ def list_next_async(next_page_link, custom_headers:nil)
1234
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1235
+
1236
+
1237
+ request_headers = {}
1238
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1239
+
1240
+ # Set Headers
1241
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1242
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1243
+ path_template = '{nextLink}'
1244
+
1245
+ request_url = @base_url || @client.base_url
1246
+
1247
+ options = {
1248
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1249
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1250
+ headers: request_headers.merge(custom_headers || {}),
1251
+ base_url: request_url
1252
+ }
1253
+ promise = @client.make_request_async(:get, path_template, options)
1254
+
1255
+ promise = promise.then do |result|
1256
+ http_response = result.response
1257
+ status_code = http_response.status
1258
+ response_content = http_response.body
1259
+ unless status_code == 200
1260
+ error_model = JSON.load(response_content)
1261
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1262
+ end
1263
+
1264
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-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::V2018_06_01_preview::Models::StreamingEndpointListResult.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 StreamingEndpoints
1284
+ #
1285
+ # Lists the StreamingEndpoints 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 [StreamingEndpointListResult] which provide lazy access to pages of
1294
+ # the 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