azure_mgmt_media_services 0.21.0 → 0.21.1

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