azure_mgmt_media_services 0.19.0 → 0.21.1

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