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,132 +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
- # 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
- api_version = '2018-07-01'
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::V2019_05_01_preview::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' => 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::V2019_05_01_preview::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
@@ -1,1089 +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
- # 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
- api_version = '2018-07-01'
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' => 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::V2019_05_01_preview::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
- api_version = '2018-07-01'
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' => 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::V2019_05_01_preview::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
- api_version = '2018-07-01'
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::V2019_05_01_preview::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' => 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::V2019_05_01_preview::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::V2019_05_01_preview::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
- api_version = '2018-07-01'
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' => 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
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
- api_version = '2018-07-01'
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::V2019_05_01_preview::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' => 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::V2019_05_01_preview::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
- api_version = '2018-07-01'
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::V2019_05_01_preview::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' => 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 Media Services accounts
664
- #
665
- # List Media Services accounts in the subscription.
666
- #
667
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
668
- # will be added to the HTTP request.
669
- #
670
- # @return [Array<SubscriptionMediaService>] operation results.
671
- #
672
- def list_by_subscription(custom_headers:nil)
673
- first_page = list_by_subscription_as_lazy(custom_headers:custom_headers)
674
- first_page.get_all_items
675
- end
676
-
677
- #
678
- # List Media Services accounts
679
- #
680
- # List Media Services accounts in the subscription.
681
- #
682
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
683
- # will be added to the HTTP request.
684
- #
685
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
686
- #
687
- def list_by_subscription_with_http_info(custom_headers:nil)
688
- list_by_subscription_async(custom_headers:custom_headers).value!
689
- end
690
-
691
- #
692
- # List Media Services accounts
693
- #
694
- # List Media Services accounts in the subscription.
695
- #
696
- # @param [Hash{String => String}] A hash of custom headers that will be added
697
- # to the HTTP request.
698
- #
699
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
700
- #
701
- def list_by_subscription_async(custom_headers:nil)
702
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
703
- api_version = '2018-07-01'
704
-
705
-
706
- request_headers = {}
707
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
708
-
709
- # Set Headers
710
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
711
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
712
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices'
713
-
714
- request_url = @base_url || @client.base_url
715
-
716
- options = {
717
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
718
- path_params: {'subscriptionId' => @client.subscription_id},
719
- query_params: {'api-version' => api_version},
720
- headers: request_headers.merge(custom_headers || {}),
721
- base_url: request_url
722
- }
723
- promise = @client.make_request_async(:get, path_template, options)
724
-
725
- promise = promise.then do |result|
726
- http_response = result.response
727
- status_code = http_response.status
728
- response_content = http_response.body
729
- unless status_code == 200
730
- error_model = JSON.load(response_content)
731
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
732
- end
733
-
734
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
735
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
736
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
737
- # Deserialize Response
738
- if status_code == 200
739
- begin
740
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
741
- result_mapper = Azure::MediaServices::Mgmt::V2019_05_01_preview::Models::SubscriptionMediaServiceCollection.mapper()
742
- result.body = @client.deserialize(result_mapper, parsed_response)
743
- rescue Exception => e
744
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
745
- end
746
- end
747
-
748
- result
749
- end
750
-
751
- promise.execute
752
- end
753
-
754
- #
755
- # Get a Media Services account
756
- #
757
- # Get the details of a Media Services account
758
- #
759
- # @param account_name [String] The Media Services account name.
760
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
761
- # will be added to the HTTP request.
762
- #
763
- # @return [SubscriptionMediaService] operation results.
764
- #
765
- def get_by_subscription(account_name, custom_headers:nil)
766
- response = get_by_subscription_async(account_name, custom_headers:custom_headers).value!
767
- response.body unless response.nil?
768
- end
769
-
770
- #
771
- # Get a Media Services account
772
- #
773
- # Get the details of a Media Services account
774
- #
775
- # @param account_name [String] The Media Services account name.
776
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
777
- # will be added to the HTTP request.
778
- #
779
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
780
- #
781
- def get_by_subscription_with_http_info(account_name, custom_headers:nil)
782
- get_by_subscription_async(account_name, custom_headers:custom_headers).value!
783
- end
784
-
785
- #
786
- # Get a Media Services account
787
- #
788
- # Get the details of a Media Services account
789
- #
790
- # @param account_name [String] The Media Services account name.
791
- # @param [Hash{String => String}] A hash of custom headers that will be added
792
- # to the HTTP request.
793
- #
794
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
795
- #
796
- def get_by_subscription_async(account_name, custom_headers:nil)
797
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
798
- fail ArgumentError, 'account_name is nil' if account_name.nil?
799
- api_version = '2018-07-01'
800
-
801
-
802
- request_headers = {}
803
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
804
-
805
- # Set Headers
806
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
807
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
808
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices/{accountName}'
809
-
810
- request_url = @base_url || @client.base_url
811
-
812
- options = {
813
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
814
- path_params: {'subscriptionId' => @client.subscription_id,'accountName' => account_name},
815
- query_params: {'api-version' => api_version},
816
- headers: request_headers.merge(custom_headers || {}),
817
- base_url: request_url
818
- }
819
- promise = @client.make_request_async(:get, path_template, options)
820
-
821
- promise = promise.then do |result|
822
- http_response = result.response
823
- status_code = http_response.status
824
- response_content = http_response.body
825
- unless status_code == 200
826
- error_model = JSON.load(response_content)
827
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
828
- end
829
-
830
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
831
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
832
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
833
- # Deserialize Response
834
- if status_code == 200
835
- begin
836
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
837
- result_mapper = Azure::MediaServices::Mgmt::V2019_05_01_preview::Models::SubscriptionMediaService.mapper()
838
- result.body = @client.deserialize(result_mapper, parsed_response)
839
- rescue Exception => e
840
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
841
- end
842
- end
843
-
844
- result
845
- end
846
-
847
- promise.execute
848
- end
849
-
850
- #
851
- # List Media Services accounts
852
- #
853
- # List Media Services accounts in the resource group
854
- #
855
- # @param next_page_link [String] The NextLink from the previous successful call
856
- # to List operation.
857
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
858
- # will be added to the HTTP request.
859
- #
860
- # @return [MediaServiceCollection] operation results.
861
- #
862
- def list_next(next_page_link, custom_headers:nil)
863
- response = list_next_async(next_page_link, custom_headers:custom_headers).value!
864
- response.body unless response.nil?
865
- end
866
-
867
- #
868
- # List Media Services accounts
869
- #
870
- # List Media Services accounts in the resource group
871
- #
872
- # @param next_page_link [String] The NextLink from the previous successful call
873
- # to List operation.
874
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
875
- # will be added to the HTTP request.
876
- #
877
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
878
- #
879
- def list_next_with_http_info(next_page_link, custom_headers:nil)
880
- list_next_async(next_page_link, custom_headers:custom_headers).value!
881
- end
882
-
883
- #
884
- # List Media Services accounts
885
- #
886
- # List Media Services accounts in the resource group
887
- #
888
- # @param next_page_link [String] The NextLink from the previous successful call
889
- # to List operation.
890
- # @param [Hash{String => String}] A hash of custom headers that will be added
891
- # to the HTTP request.
892
- #
893
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
894
- #
895
- def list_next_async(next_page_link, custom_headers:nil)
896
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
897
-
898
-
899
- request_headers = {}
900
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
901
-
902
- # Set Headers
903
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
904
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
905
- path_template = '{nextLink}'
906
-
907
- request_url = @base_url || @client.base_url
908
-
909
- options = {
910
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
911
- skip_encoding_path_params: {'nextLink' => next_page_link},
912
- headers: request_headers.merge(custom_headers || {}),
913
- base_url: request_url
914
- }
915
- promise = @client.make_request_async(:get, path_template, options)
916
-
917
- promise = promise.then do |result|
918
- http_response = result.response
919
- status_code = http_response.status
920
- response_content = http_response.body
921
- unless status_code == 200
922
- error_model = JSON.load(response_content)
923
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
924
- end
925
-
926
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
927
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
928
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
929
- # Deserialize Response
930
- if status_code == 200
931
- begin
932
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
933
- result_mapper = Azure::MediaServices::Mgmt::V2019_05_01_preview::Models::MediaServiceCollection.mapper()
934
- result.body = @client.deserialize(result_mapper, parsed_response)
935
- rescue Exception => e
936
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
937
- end
938
- end
939
-
940
- result
941
- end
942
-
943
- promise.execute
944
- end
945
-
946
- #
947
- # List Media Services accounts
948
- #
949
- # List Media Services accounts in the subscription.
950
- #
951
- # @param next_page_link [String] The NextLink from the previous successful call
952
- # to List operation.
953
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
954
- # will be added to the HTTP request.
955
- #
956
- # @return [SubscriptionMediaServiceCollection] operation results.
957
- #
958
- def list_by_subscription_next(next_page_link, custom_headers:nil)
959
- response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
960
- response.body unless response.nil?
961
- end
962
-
963
- #
964
- # List Media Services accounts
965
- #
966
- # List Media Services accounts in the subscription.
967
- #
968
- # @param next_page_link [String] The NextLink from the previous successful call
969
- # to List operation.
970
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
971
- # will be added to the HTTP request.
972
- #
973
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
974
- #
975
- def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
976
- list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
977
- end
978
-
979
- #
980
- # List Media Services accounts
981
- #
982
- # List Media Services accounts in the subscription.
983
- #
984
- # @param next_page_link [String] The NextLink from the previous successful call
985
- # to List operation.
986
- # @param [Hash{String => String}] A hash of custom headers that will be added
987
- # to the HTTP request.
988
- #
989
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
990
- #
991
- def list_by_subscription_next_async(next_page_link, custom_headers:nil)
992
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
993
-
994
-
995
- request_headers = {}
996
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
997
-
998
- # Set Headers
999
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1000
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1001
- path_template = '{nextLink}'
1002
-
1003
- request_url = @base_url || @client.base_url
1004
-
1005
- options = {
1006
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1007
- skip_encoding_path_params: {'nextLink' => next_page_link},
1008
- headers: request_headers.merge(custom_headers || {}),
1009
- base_url: request_url
1010
- }
1011
- promise = @client.make_request_async(:get, path_template, options)
1012
-
1013
- promise = promise.then do |result|
1014
- http_response = result.response
1015
- status_code = http_response.status
1016
- response_content = http_response.body
1017
- unless status_code == 200
1018
- error_model = JSON.load(response_content)
1019
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1020
- end
1021
-
1022
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1023
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1024
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1025
- # Deserialize Response
1026
- if status_code == 200
1027
- begin
1028
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1029
- result_mapper = Azure::MediaServices::Mgmt::V2019_05_01_preview::Models::SubscriptionMediaServiceCollection.mapper()
1030
- result.body = @client.deserialize(result_mapper, parsed_response)
1031
- rescue Exception => e
1032
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1033
- end
1034
- end
1035
-
1036
- result
1037
- end
1038
-
1039
- promise.execute
1040
- end
1041
-
1042
- #
1043
- # List Media Services accounts
1044
- #
1045
- # List Media Services accounts in the resource group
1046
- #
1047
- # @param resource_group_name [String] The name of the resource group within the
1048
- # Azure subscription.
1049
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1050
- # will be added to the HTTP request.
1051
- #
1052
- # @return [MediaServiceCollection] which provide lazy access to pages of the
1053
- # response.
1054
- #
1055
- def list_as_lazy(resource_group_name, custom_headers:nil)
1056
- response = list_async(resource_group_name, custom_headers:custom_headers).value!
1057
- unless response.nil?
1058
- page = response.body
1059
- page.next_method = Proc.new do |next_page_link|
1060
- list_next_async(next_page_link, custom_headers:custom_headers)
1061
- end
1062
- page
1063
- end
1064
- end
1065
-
1066
- #
1067
- # List Media Services accounts
1068
- #
1069
- # List Media Services accounts in the subscription.
1070
- #
1071
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1072
- # will be added to the HTTP request.
1073
- #
1074
- # @return [SubscriptionMediaServiceCollection] which provide lazy access to
1075
- # pages of the response.
1076
- #
1077
- def list_by_subscription_as_lazy(custom_headers:nil)
1078
- response = list_by_subscription_async(custom_headers:custom_headers).value!
1079
- unless response.nil?
1080
- page = response.body
1081
- page.next_method = Proc.new do |next_page_link|
1082
- list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
1083
- end
1084
- page
1085
- end
1086
- end
1087
-
1088
- end
1089
- end