azure_mgmt_media_services 0.21.0 → 0.21.1

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