azure_mgmt_media_services 0.20.1 → 0.21.0

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