azure_mgmt_media_services 0.17.1 → 0.17.2

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