azure_mgmt_media_services 0.20.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-10-01/generated/azure_mgmt_media_services/media_services_management_client.rb +1 -1
  3. data/lib/2018-03-30-preview/generated/azure_mgmt_media_services/azure_media_services.rb +1 -1
  4. data/lib/2018-06-01-preview/generated/azure_mgmt_media_services/azure_media_services.rb +1 -1
  5. data/lib/2018-07-01/generated/azure_mgmt_media_services/azure_media_services.rb +1 -1
  6. data/lib/2019-05-01-preview/generated/azure_mgmt_media_services/azure_media_services.rb +1 -1
  7. data/lib/2020-05-01/generated/azure_mgmt_media_services.rb +266 -0
  8. data/lib/2020-05-01/generated/azure_mgmt_media_services/account_filters.rb +698 -0
  9. data/lib/2020-05-01/generated/azure_mgmt_media_services/asset_filters.rb +719 -0
  10. data/lib/2020-05-01/generated/azure_mgmt_media_services/assets.rb +1069 -0
  11. data/lib/2020-05-01/generated/azure_mgmt_media_services/azure_media_services.rb +193 -0
  12. data/lib/2020-05-01/generated/azure_mgmt_media_services/content_key_policies.rb +829 -0
  13. data/lib/2020-05-01/generated/azure_mgmt_media_services/jobs.rb +826 -0
  14. data/lib/2020-05-01/generated/azure_mgmt_media_services/live_events.rb +1509 -0
  15. data/lib/2020-05-01/generated/azure_mgmt_media_services/live_outputs.rb +737 -0
  16. data/lib/2020-05-01/generated/azure_mgmt_media_services/locations.rb +132 -0
  17. data/lib/2020-05-01/generated/azure_mgmt_media_services/mediaservices.rb +1203 -0
  18. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/aac_audio.rb +94 -0
  19. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/aac_audio_profile.rb +17 -0
  20. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/absolute_clip_time.rb +65 -0
  21. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/account_encryption.rb +61 -0
  22. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/account_encryption_key_type.rb +16 -0
  23. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/account_filter.rb +106 -0
  24. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/account_filter_collection.rb +99 -0
  25. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/akamai_access_control.rb +56 -0
  26. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/akamai_signature_header_authentication_key.rb +68 -0
  27. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/analysis_resolution.rb +16 -0
  28. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/api_error.rb +47 -0
  29. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset.rb +156 -0
  30. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_collection.rb +99 -0
  31. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_container_permission.rb +17 -0
  32. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_container_sas.rb +54 -0
  33. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_file_encryption_metadata.rb +68 -0
  34. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_filter.rb +106 -0
  35. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_filter_collection.rb +99 -0
  36. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_storage_encryption_format.rb +16 -0
  37. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/asset_streaming_locator.rb +133 -0
  38. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/audio.rb +92 -0
  39. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/audio_analysis_mode.rb +16 -0
  40. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/audio_analyzer_preset.rb +110 -0
  41. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/audio_overlay.rb +98 -0
  42. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/azure_entity_resource.rb +75 -0
  43. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/built_in_standard_encoder_preset.rb +68 -0
  44. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/cbcs_drm_configuration.rb +73 -0
  45. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/cenc_drm_configuration.rb +61 -0
  46. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/check_name_availability_input.rb +58 -0
  47. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/clip_time.rb +48 -0
  48. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/codec.rb +66 -0
  49. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/common_encryption_cbcs.rb +95 -0
  50. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/common_encryption_cenc.rb +95 -0
  51. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy.rb +129 -0
  52. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_clear_key_configuration.rb +50 -0
  53. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_collection.rb +100 -0
  54. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_configuration.rb +51 -0
  55. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_configuration.rb +124 -0
  56. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_offline_rental_configuration.rb +59 -0
  57. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_fair_play_rental_and_lease_key_type.rb +19 -0
  58. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_open_restriction.rb +51 -0
  59. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_option.rb +87 -0
  60. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_configuration.rb +82 -0
  61. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_encryption_key_from_header.rb +51 -0
  62. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_encryption_key_from_key_identifier.rb +64 -0
  63. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_key_location.rb +49 -0
  64. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_content_type.rb +18 -0
  65. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_explicit_analog_television_restriction.rb +61 -0
  66. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_license.rb +154 -0
  67. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_license_type.rb +17 -0
  68. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_play_right.rb +195 -0
  69. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_play_ready_unknown_output_passing_option.rb +18 -0
  70. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_properties.rb +102 -0
  71. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_restriction.rb +49 -0
  72. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_restriction_token_key.rb +49 -0
  73. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_restriction_token_type.rb +17 -0
  74. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_rsa_token_key.rb +72 -0
  75. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_symmetric_token_key.rb +61 -0
  76. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_token_claim.rb +57 -0
  77. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_token_restriction.rb +155 -0
  78. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_unknown_configuration.rb +51 -0
  79. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_unknown_restriction.rb +51 -0
  80. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_widevine_configuration.rb +61 -0
  81. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/content_key_policy_x509certificate_token_key.rb +62 -0
  82. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/copy_audio.rb +58 -0
  83. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/copy_video.rb +59 -0
  84. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/cross_site_access_policies.rb +58 -0
  85. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/default_key.rb +59 -0
  86. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/deinterlace.rb +60 -0
  87. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/deinterlace_mode.rb +16 -0
  88. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/deinterlace_parity.rb +17 -0
  89. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/edge_policies.rb +48 -0
  90. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/edge_usage_data_collection_policy.rb +85 -0
  91. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/edge_usage_data_event_hub.rb +70 -0
  92. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/enabled_protocols.rb +79 -0
  93. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/encoder_named_preset.rb +25 -0
  94. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/encryption_scheme.rb +18 -0
  95. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/entity_name_availability_check_output.rb +69 -0
  96. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/entropy_mode.rb +16 -0
  97. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/envelope_encryption.rb +100 -0
  98. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/face_detector_preset.rb +95 -0
  99. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filter_track_property_compare_operation.rb +16 -0
  100. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filter_track_property_condition.rb +71 -0
  101. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filter_track_property_type.rb +20 -0
  102. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filter_track_selection.rb +56 -0
  103. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/filters.rb +97 -0
  104. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/first_quality.rb +46 -0
  105. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/format.rb +74 -0
  106. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/h264complexity.rb +17 -0
  107. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/h264layer.rb +189 -0
  108. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/h264video.rb +130 -0
  109. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/h264video_profile.rb +20 -0
  110. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/hls.rb +48 -0
  111. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/image.rb +145 -0
  112. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/image_format.rb +58 -0
  113. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/insights_type.rb +17 -0
  114. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/ipaccess_control.rb +55 -0
  115. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/iprange.rb +68 -0
  116. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job.rb +210 -0
  117. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_collection.rb +99 -0
  118. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_error.rb +114 -0
  119. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_error_category.rb +19 -0
  120. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_error_code.rb +23 -0
  121. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_error_detail.rb +59 -0
  122. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_input.rb +49 -0
  123. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_input_asset.rb +107 -0
  124. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_input_clip.rb +117 -0
  125. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_input_http.rb +110 -0
  126. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_inputs.rb +72 -0
  127. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_output.rb +138 -0
  128. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_output_asset.rb +115 -0
  129. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_retry.rb +16 -0
  130. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/job_state.rb +21 -0
  131. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/jpg_format.rb +58 -0
  132. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/jpg_image.rb +144 -0
  133. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/jpg_layer.rb +86 -0
  134. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/key_vault_properties.rb +63 -0
  135. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/layer.rb +93 -0
  136. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_container_sas_input.rb +59 -0
  137. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_content_keys_response.rb +56 -0
  138. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_edge_policies_input.rb +47 -0
  139. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_paths_response.rb +76 -0
  140. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/list_streaming_locators_response.rb +56 -0
  141. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event.rb +274 -0
  142. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_action_input.rb +48 -0
  143. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_encoding.rb +99 -0
  144. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_encoding_type.rb +17 -0
  145. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_endpoint.rb +57 -0
  146. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_input.rb +109 -0
  147. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_input_access_control.rb +47 -0
  148. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_input_protocol.rb +16 -0
  149. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_input_track_selection.rb +72 -0
  150. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_list_result.rb +110 -0
  151. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_output_transcription_track.rb +49 -0
  152. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_preview.rb +113 -0
  153. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_preview_access_control.rb +47 -0
  154. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_resource_state.rb +21 -0
  155. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_event_transcription.rb +91 -0
  156. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_output.rb +185 -0
  157. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_output_list_result.rb +111 -0
  158. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/live_output_resource_state.rb +17 -0
  159. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/location.rb +47 -0
  160. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/log_specification.rb +71 -0
  161. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/managed_identity_type.rb +16 -0
  162. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/media_service.rb +155 -0
  163. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/media_service_collection.rb +99 -0
  164. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/media_service_identity.rb +72 -0
  165. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/metric_aggregation_type.rb +17 -0
  166. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/metric_dimension.rb +71 -0
  167. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/metric_specification.rb +137 -0
  168. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/metric_unit.rb +17 -0
  169. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/mp4format.rb +75 -0
  170. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/multi_bitrate_format.rb +84 -0
  171. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/no_encryption.rb +47 -0
  172. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/odata_error.rb +89 -0
  173. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/on_error_type.rb +16 -0
  174. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/operation.rb +81 -0
  175. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/operation_collection.rb +99 -0
  176. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/operation_display.rb +79 -0
  177. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/output_file.rb +59 -0
  178. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/overlay.rb +133 -0
  179. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/png_format.rb +58 -0
  180. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/png_image.rb +128 -0
  181. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/png_layer.rb +74 -0
  182. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/presentation_time_range.rb +102 -0
  183. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/preset.rb +51 -0
  184. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/priority.rb +17 -0
  185. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint.rb +47 -0
  186. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint_connection.rb +101 -0
  187. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint_connection_list_result.rb +57 -0
  188. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint_connection_provisioning_state.rb +18 -0
  189. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_endpoint_service_connection_status.rb +17 -0
  190. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_link_resource.rb +115 -0
  191. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_link_resource_list_result.rb +55 -0
  192. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/private_link_service_connection_state.rb +72 -0
  193. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/properties.rb +48 -0
  194. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/provider.rb +46 -0
  195. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/proxy_resource.rb +63 -0
  196. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/rectangle.rb +88 -0
  197. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/resource.rb +83 -0
  198. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/rotation.rb +20 -0
  199. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/service_specification.rb +77 -0
  200. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/standard_encoder_preset.rb +110 -0
  201. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/storage_account.rb +62 -0
  202. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/storage_account_type.rb +16 -0
  203. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/storage_authentication.rb +16 -0
  204. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/storage_encrypted_asset_decryption_data.rb +68 -0
  205. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/stream_options_flag.rb +16 -0
  206. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_endpoint.rb +285 -0
  207. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_endpoint_access_control.rb +60 -0
  208. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_endpoint_list_result.rb +111 -0
  209. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_endpoint_resource_state.rb +20 -0
  210. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_entity_scale_unit.rb +46 -0
  211. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_locator.rb +199 -0
  212. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_locator_collection.rb +100 -0
  213. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_locator_content_key.rb +116 -0
  214. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_locator_content_key_type.rb +17 -0
  215. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_path.rb +80 -0
  216. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy.rb +133 -0
  217. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_collection.rb +99 -0
  218. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_content_key.rb +78 -0
  219. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_content_keys.rb +68 -0
  220. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_fair_play_configuration.rb +64 -0
  221. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_play_ready_configuration.rb +64 -0
  222. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_streaming_protocol.rb +18 -0
  223. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/streaming_policy_widevine_configuration.rb +53 -0
  224. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/stretch_mode.rb +17 -0
  225. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/sync_storage_keys_input.rb +46 -0
  226. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/track_property_compare_operation.rb +16 -0
  227. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/track_property_condition.rb +70 -0
  228. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/track_property_type.rb +16 -0
  229. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/track_selection.rb +56 -0
  230. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/tracked_resource.rb +92 -0
  231. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/transform.rb +123 -0
  232. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/transform_collection.rb +99 -0
  233. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/transform_output.rb +82 -0
  234. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/transport_stream_format.rb +76 -0
  235. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/utc_clip_time.rb +64 -0
  236. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video.rb +98 -0
  237. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video_analyzer_preset.rb +103 -0
  238. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video_layer.rb +156 -0
  239. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video_overlay.rb +136 -0
  240. data/lib/2020-05-01/generated/azure_mgmt_media_services/models/video_sync_mode.rb +18 -0
  241. data/lib/2020-05-01/generated/azure_mgmt_media_services/module_definition.rb +9 -0
  242. data/lib/2020-05-01/generated/azure_mgmt_media_services/operations.rb +233 -0
  243. data/lib/2020-05-01/generated/azure_mgmt_media_services/private_endpoint_connections.rb +449 -0
  244. data/lib/2020-05-01/generated/azure_mgmt_media_services/private_link_resources.rb +235 -0
  245. data/lib/2020-05-01/generated/azure_mgmt_media_services/streaming_endpoints.rb +1364 -0
  246. data/lib/2020-05-01/generated/azure_mgmt_media_services/streaming_locators.rb +808 -0
  247. data/lib/2020-05-01/generated/azure_mgmt_media_services/streaming_policies.rb +594 -0
  248. data/lib/2020-05-01/generated/azure_mgmt_media_services/transforms.rb +710 -0
  249. data/lib/azure_mgmt_media_services.rb +3 -2
  250. data/lib/profiles/latest/modules/mediaservices_profile_module.rb +594 -494
  251. data/lib/version.rb +1 -1
  252. metadata +245 -3
@@ -0,0 +1,193 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::MediaServices::Mgmt::V2020_05_01
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class AzureMediaServices < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] The unique identifier for a Microsoft Azure
21
+ # subscription.
22
+ attr_accessor :subscription_id
23
+
24
+ # @return [String] The version of the API to be used with the client
25
+ # request.
26
+ attr_reader :api_version
27
+
28
+ # @return [String] The preferred language for the response.
29
+ attr_accessor :accept_language
30
+
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
+ attr_accessor :long_running_operation_retry_timeout
34
+
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
38
+ attr_accessor :generate_client_request_id
39
+
40
+ # @return [AccountFilters] account_filters
41
+ attr_reader :account_filters
42
+
43
+ # @return [Operations] operations
44
+ attr_reader :operations
45
+
46
+ # @return [Mediaservices] mediaservices
47
+ attr_reader :mediaservices
48
+
49
+ # @return [PrivateLinkResources] private_link_resources
50
+ attr_reader :private_link_resources
51
+
52
+ # @return [PrivateEndpointConnections] private_endpoint_connections
53
+ attr_reader :private_endpoint_connections
54
+
55
+ # @return [Locations] locations
56
+ attr_reader :locations
57
+
58
+ # @return [Assets] assets
59
+ attr_reader :assets
60
+
61
+ # @return [AssetFilters] asset_filters
62
+ attr_reader :asset_filters
63
+
64
+ # @return [ContentKeyPolicies] content_key_policies
65
+ attr_reader :content_key_policies
66
+
67
+ # @return [Transforms] transforms
68
+ attr_reader :transforms
69
+
70
+ # @return [Jobs] jobs
71
+ attr_reader :jobs
72
+
73
+ # @return [StreamingPolicies] streaming_policies
74
+ attr_reader :streaming_policies
75
+
76
+ # @return [StreamingLocators] streaming_locators
77
+ attr_reader :streaming_locators
78
+
79
+ # @return [LiveEvents] live_events
80
+ attr_reader :live_events
81
+
82
+ # @return [LiveOutputs] live_outputs
83
+ attr_reader :live_outputs
84
+
85
+ # @return [StreamingEndpoints] streaming_endpoints
86
+ attr_reader :streaming_endpoints
87
+
88
+ #
89
+ # Creates initializes a new instance of the AzureMediaServices class.
90
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
91
+ # @param base_url [String] the base URI of the service.
92
+ # @param options [Array] filters to be applied to the HTTP requests.
93
+ #
94
+ def initialize(credentials = nil, base_url = nil, options = nil)
95
+ super(credentials, options)
96
+ @base_url = base_url || 'https://management.azure.com'
97
+
98
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
99
+ @credentials = credentials
100
+
101
+ @account_filters = AccountFilters.new(self)
102
+ @operations = Operations.new(self)
103
+ @mediaservices = Mediaservices.new(self)
104
+ @private_link_resources = PrivateLinkResources.new(self)
105
+ @private_endpoint_connections = PrivateEndpointConnections.new(self)
106
+ @locations = Locations.new(self)
107
+ @assets = Assets.new(self)
108
+ @asset_filters = AssetFilters.new(self)
109
+ @content_key_policies = ContentKeyPolicies.new(self)
110
+ @transforms = Transforms.new(self)
111
+ @jobs = Jobs.new(self)
112
+ @streaming_policies = StreamingPolicies.new(self)
113
+ @streaming_locators = StreamingLocators.new(self)
114
+ @live_events = LiveEvents.new(self)
115
+ @live_outputs = LiveOutputs.new(self)
116
+ @streaming_endpoints = StreamingEndpoints.new(self)
117
+ @api_version = '2020-05-01'
118
+ @accept_language = 'en-US'
119
+ @long_running_operation_retry_timeout = 30
120
+ @generate_client_request_id = true
121
+ add_telemetry
122
+ end
123
+
124
+ #
125
+ # Makes a request and returns the body of the response.
126
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
127
+ # @param path [String] the path, relative to {base_url}.
128
+ # @param options [Hash{String=>String}] specifying any request options like :body.
129
+ # @return [Hash{String=>String}] containing the body of the response.
130
+ # Example:
131
+ #
132
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
133
+ # path = "/path"
134
+ # options = {
135
+ # body: request_content,
136
+ # query_params: {'api-version' => '2016-02-01'}
137
+ # }
138
+ # result = @client.make_request(:put, path, options)
139
+ #
140
+ def make_request(method, path, options = {})
141
+ result = make_request_with_http_info(method, path, options)
142
+ result.body unless result.nil?
143
+ end
144
+
145
+ #
146
+ # Makes a request and returns the operation response.
147
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
148
+ # @param path [String] the path, relative to {base_url}.
149
+ # @param options [Hash{String=>String}] specifying any request options like :body.
150
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
151
+ #
152
+ def make_request_with_http_info(method, path, options = {})
153
+ result = make_request_async(method, path, options).value!
154
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
155
+ result
156
+ end
157
+
158
+ #
159
+ # Makes a request asynchronously.
160
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
161
+ # @param path [String] the path, relative to {base_url}.
162
+ # @param options [Hash{String=>String}] specifying any request options like :body.
163
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
164
+ #
165
+ def make_request_async(method, path, options = {})
166
+ fail ArgumentError, 'method is nil' if method.nil?
167
+ fail ArgumentError, 'path is nil' if path.nil?
168
+
169
+ request_url = options[:base_url] || @base_url
170
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
171
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
172
+ end
173
+
174
+ request_headers = @request_headers
175
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
176
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
177
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
178
+
179
+ super(request_url, method, path, options)
180
+ end
181
+
182
+
183
+ private
184
+ #
185
+ # Adds telemetry information.
186
+ #
187
+ def add_telemetry
188
+ sdk_information = 'azure_mgmt_media_services'
189
+ sdk_information = "#{sdk_information}/0.21.0"
190
+ add_user_agent_information(sdk_information)
191
+ end
192
+ end
193
+ end
@@ -0,0 +1,829 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::MediaServices::Mgmt::V2020_05_01
7
+ #
8
+ # ContentKeyPolicies
9
+ #
10
+ class ContentKeyPolicies
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ContentKeyPolicies 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 Content Key Policies
26
+ #
27
+ # Lists the Content Key Policies in the account
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group within the
30
+ # Azure subscription.
31
+ # @param account_name [String] The Media Services account name.
32
+ # @param filter [String] Restricts the set of items returned.
33
+ # @param top [Integer] Specifies a non-negative integer n that limits the
34
+ # number of items returned from a collection. The service returns the number of
35
+ # available items up to but not greater than the specified value n.
36
+ # @param orderby [String] Specifies the key by which the result collection
37
+ # should be ordered.
38
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
+ # will be added to the HTTP request.
40
+ #
41
+ # @return [Array<ContentKeyPolicy>] operation results.
42
+ #
43
+ def list(resource_group_name, account_name, filter:nil, top:nil, orderby:nil, custom_headers:nil)
44
+ first_page = list_as_lazy(resource_group_name, account_name, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers)
45
+ first_page.get_all_items
46
+ end
47
+
48
+ #
49
+ # List Content Key Policies
50
+ #
51
+ # Lists the Content Key Policies in the account
52
+ #
53
+ # @param resource_group_name [String] The name of the resource group within the
54
+ # Azure subscription.
55
+ # @param account_name [String] The Media Services account name.
56
+ # @param filter [String] Restricts the set of items returned.
57
+ # @param top [Integer] Specifies a non-negative integer n that limits the
58
+ # number of items returned from a collection. The service returns the number of
59
+ # available items up to but not greater than the specified value n.
60
+ # @param orderby [String] Specifies the key by which the result collection
61
+ # should be ordered.
62
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
63
+ # will be added to the HTTP request.
64
+ #
65
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
66
+ #
67
+ def list_with_http_info(resource_group_name, account_name, filter:nil, top:nil, orderby:nil, custom_headers:nil)
68
+ list_async(resource_group_name, account_name, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
69
+ end
70
+
71
+ #
72
+ # List Content Key Policies
73
+ #
74
+ # Lists the Content Key Policies in the account
75
+ #
76
+ # @param resource_group_name [String] The name of the resource group within the
77
+ # Azure subscription.
78
+ # @param account_name [String] The Media Services account name.
79
+ # @param filter [String] Restricts the set of items returned.
80
+ # @param top [Integer] Specifies a non-negative integer n that limits the
81
+ # number of items returned from a collection. The service returns the number of
82
+ # available items up to but not greater than the specified value n.
83
+ # @param orderby [String] Specifies the key by which the result collection
84
+ # should be ordered.
85
+ # @param [Hash{String => String}] A hash of custom headers that will be added
86
+ # to the HTTP request.
87
+ #
88
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
89
+ #
90
+ def list_async(resource_group_name, account_name, filter:nil, top:nil, orderby:nil, custom_headers:nil)
91
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
92
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
93
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
94
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
95
+
96
+
97
+ request_headers = {}
98
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
99
+
100
+ # Set Headers
101
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
102
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
103
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies'
104
+
105
+ request_url = @base_url || @client.base_url
106
+
107
+ options = {
108
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
109
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
110
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top,'$orderby' => orderby},
111
+ headers: request_headers.merge(custom_headers || {}),
112
+ base_url: request_url
113
+ }
114
+ promise = @client.make_request_async(:get, path_template, options)
115
+
116
+ promise = promise.then do |result|
117
+ http_response = result.response
118
+ status_code = http_response.status
119
+ response_content = http_response.body
120
+ unless status_code == 200
121
+ error_model = JSON.load(response_content)
122
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
123
+ end
124
+
125
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
126
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
127
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
128
+ # Deserialize Response
129
+ if status_code == 200
130
+ begin
131
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
132
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicyCollection.mapper()
133
+ result.body = @client.deserialize(result_mapper, parsed_response)
134
+ rescue Exception => e
135
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
136
+ end
137
+ end
138
+
139
+ result
140
+ end
141
+
142
+ promise.execute
143
+ end
144
+
145
+ #
146
+ # Get a Content Key Policy
147
+ #
148
+ # Get the details of a Content Key Policy in the Media Services account
149
+ #
150
+ # @param resource_group_name [String] The name of the resource group within the
151
+ # Azure subscription.
152
+ # @param account_name [String] The Media Services account name.
153
+ # @param content_key_policy_name [String] The Content Key Policy name.
154
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
155
+ # will be added to the HTTP request.
156
+ #
157
+ # @return [ContentKeyPolicy] operation results.
158
+ #
159
+ def get(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
160
+ response = get_async(resource_group_name, account_name, content_key_policy_name, custom_headers:custom_headers).value!
161
+ response.body unless response.nil?
162
+ end
163
+
164
+ #
165
+ # Get a Content Key Policy
166
+ #
167
+ # Get the details of a Content Key Policy in the Media Services account
168
+ #
169
+ # @param resource_group_name [String] The name of the resource group within the
170
+ # Azure subscription.
171
+ # @param account_name [String] The Media Services account name.
172
+ # @param content_key_policy_name [String] The Content Key Policy name.
173
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
174
+ # will be added to the HTTP request.
175
+ #
176
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
177
+ #
178
+ def get_with_http_info(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
179
+ get_async(resource_group_name, account_name, content_key_policy_name, custom_headers:custom_headers).value!
180
+ end
181
+
182
+ #
183
+ # Get a Content Key Policy
184
+ #
185
+ # Get the details of a Content Key Policy in the Media Services account
186
+ #
187
+ # @param resource_group_name [String] The name of the resource group within the
188
+ # Azure subscription.
189
+ # @param account_name [String] The Media Services account name.
190
+ # @param content_key_policy_name [String] The Content Key Policy name.
191
+ # @param [Hash{String => String}] A hash of custom headers that will be added
192
+ # to the HTTP request.
193
+ #
194
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
195
+ #
196
+ def get_async(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
197
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
198
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
199
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
200
+ fail ArgumentError, 'content_key_policy_name is nil' if content_key_policy_name.nil?
201
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
202
+
203
+
204
+ request_headers = {}
205
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
206
+
207
+ # Set Headers
208
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
209
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
210
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}'
211
+
212
+ request_url = @base_url || @client.base_url
213
+
214
+ options = {
215
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
216
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'contentKeyPolicyName' => content_key_policy_name},
217
+ query_params: {'api-version' => @client.api_version},
218
+ headers: request_headers.merge(custom_headers || {}),
219
+ base_url: request_url
220
+ }
221
+ promise = @client.make_request_async(:get, path_template, options)
222
+
223
+ promise = promise.then do |result|
224
+ http_response = result.response
225
+ status_code = http_response.status
226
+ response_content = http_response.body
227
+ unless status_code == 200 || status_code == 404
228
+ error_model = JSON.load(response_content)
229
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
230
+ end
231
+
232
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
233
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
234
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
235
+ # Deserialize Response
236
+ if status_code == 200
237
+ begin
238
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
239
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicy.mapper()
240
+ result.body = @client.deserialize(result_mapper, parsed_response)
241
+ rescue Exception => e
242
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
243
+ end
244
+ end
245
+
246
+ result
247
+ end
248
+
249
+ promise.execute
250
+ end
251
+
252
+ #
253
+ # Create or update an Content Key Policy
254
+ #
255
+ # Create or update a Content Key Policy in the Media Services account
256
+ #
257
+ # @param resource_group_name [String] The name of the resource group within the
258
+ # Azure subscription.
259
+ # @param account_name [String] The Media Services account name.
260
+ # @param content_key_policy_name [String] The Content Key Policy name.
261
+ # @param parameters [ContentKeyPolicy] The request parameters
262
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
263
+ # will be added to the HTTP request.
264
+ #
265
+ # @return [ContentKeyPolicy] operation results.
266
+ #
267
+ def create_or_update(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:nil)
268
+ response = create_or_update_async(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:custom_headers).value!
269
+ response.body unless response.nil?
270
+ end
271
+
272
+ #
273
+ # Create or update an Content Key Policy
274
+ #
275
+ # Create or update a Content Key Policy in the Media Services account
276
+ #
277
+ # @param resource_group_name [String] The name of the resource group within the
278
+ # Azure subscription.
279
+ # @param account_name [String] The Media Services account name.
280
+ # @param content_key_policy_name [String] The Content Key Policy name.
281
+ # @param parameters [ContentKeyPolicy] The request parameters
282
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
283
+ # will be added to the HTTP request.
284
+ #
285
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
286
+ #
287
+ def create_or_update_with_http_info(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:nil)
288
+ create_or_update_async(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:custom_headers).value!
289
+ end
290
+
291
+ #
292
+ # Create or update an Content Key Policy
293
+ #
294
+ # Create or update a Content Key Policy in the Media Services account
295
+ #
296
+ # @param resource_group_name [String] The name of the resource group within the
297
+ # Azure subscription.
298
+ # @param account_name [String] The Media Services account name.
299
+ # @param content_key_policy_name [String] The Content Key Policy name.
300
+ # @param parameters [ContentKeyPolicy] The request parameters
301
+ # @param [Hash{String => String}] A hash of custom headers that will be added
302
+ # to the HTTP request.
303
+ #
304
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
305
+ #
306
+ def create_or_update_async(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:nil)
307
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
308
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
309
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
310
+ fail ArgumentError, 'content_key_policy_name is nil' if content_key_policy_name.nil?
311
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
312
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
313
+
314
+
315
+ request_headers = {}
316
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
317
+
318
+ # Set Headers
319
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
320
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
321
+
322
+ # Serialize Request
323
+ request_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicy.mapper()
324
+ request_content = @client.serialize(request_mapper, parameters)
325
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
326
+
327
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}'
328
+
329
+ request_url = @base_url || @client.base_url
330
+
331
+ options = {
332
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
333
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'contentKeyPolicyName' => content_key_policy_name},
334
+ query_params: {'api-version' => @client.api_version},
335
+ body: request_content,
336
+ headers: request_headers.merge(custom_headers || {}),
337
+ base_url: request_url
338
+ }
339
+ promise = @client.make_request_async(:put, path_template, options)
340
+
341
+ promise = promise.then do |result|
342
+ http_response = result.response
343
+ status_code = http_response.status
344
+ response_content = http_response.body
345
+ unless status_code == 200 || status_code == 201
346
+ error_model = JSON.load(response_content)
347
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
348
+ end
349
+
350
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
351
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
352
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
353
+ # Deserialize Response
354
+ if status_code == 200
355
+ begin
356
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
357
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicy.mapper()
358
+ result.body = @client.deserialize(result_mapper, parsed_response)
359
+ rescue Exception => e
360
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
361
+ end
362
+ end
363
+ # Deserialize Response
364
+ if status_code == 201
365
+ begin
366
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
367
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicy.mapper()
368
+ result.body = @client.deserialize(result_mapper, parsed_response)
369
+ rescue Exception => e
370
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
371
+ end
372
+ end
373
+
374
+ result
375
+ end
376
+
377
+ promise.execute
378
+ end
379
+
380
+ #
381
+ # Delete a Content Key Policy
382
+ #
383
+ # Deletes a Content Key Policy in the Media Services account
384
+ #
385
+ # @param resource_group_name [String] The name of the resource group within the
386
+ # Azure subscription.
387
+ # @param account_name [String] The Media Services account name.
388
+ # @param content_key_policy_name [String] The Content Key Policy name.
389
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
390
+ # will be added to the HTTP request.
391
+ #
392
+ #
393
+ def delete(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
394
+ response = delete_async(resource_group_name, account_name, content_key_policy_name, custom_headers:custom_headers).value!
395
+ nil
396
+ end
397
+
398
+ #
399
+ # Delete a Content Key Policy
400
+ #
401
+ # Deletes a Content Key Policy in the Media Services account
402
+ #
403
+ # @param resource_group_name [String] The name of the resource group within the
404
+ # Azure subscription.
405
+ # @param account_name [String] The Media Services account name.
406
+ # @param content_key_policy_name [String] The Content Key Policy name.
407
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
408
+ # will be added to the HTTP request.
409
+ #
410
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
411
+ #
412
+ def delete_with_http_info(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
413
+ delete_async(resource_group_name, account_name, content_key_policy_name, custom_headers:custom_headers).value!
414
+ end
415
+
416
+ #
417
+ # Delete a Content Key Policy
418
+ #
419
+ # Deletes a Content Key Policy in the Media Services account
420
+ #
421
+ # @param resource_group_name [String] The name of the resource group within the
422
+ # Azure subscription.
423
+ # @param account_name [String] The Media Services account name.
424
+ # @param content_key_policy_name [String] The Content Key Policy name.
425
+ # @param [Hash{String => String}] A hash of custom headers that will be added
426
+ # to the HTTP request.
427
+ #
428
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
429
+ #
430
+ def delete_async(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
431
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
432
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
433
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
434
+ fail ArgumentError, 'content_key_policy_name is nil' if content_key_policy_name.nil?
435
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
436
+
437
+
438
+ request_headers = {}
439
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
440
+
441
+ # Set Headers
442
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
443
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
444
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}'
445
+
446
+ request_url = @base_url || @client.base_url
447
+
448
+ options = {
449
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
450
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'contentKeyPolicyName' => content_key_policy_name},
451
+ query_params: {'api-version' => @client.api_version},
452
+ headers: request_headers.merge(custom_headers || {}),
453
+ base_url: request_url
454
+ }
455
+ promise = @client.make_request_async(:delete, path_template, options)
456
+
457
+ promise = promise.then do |result|
458
+ http_response = result.response
459
+ status_code = http_response.status
460
+ response_content = http_response.body
461
+ unless status_code == 200 || status_code == 204
462
+ error_model = JSON.load(response_content)
463
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
464
+ end
465
+
466
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
467
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
468
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
469
+
470
+ result
471
+ end
472
+
473
+ promise.execute
474
+ end
475
+
476
+ #
477
+ # Update a Content Key Policy
478
+ #
479
+ # Updates an existing Content Key Policy in the Media Services account
480
+ #
481
+ # @param resource_group_name [String] The name of the resource group within the
482
+ # Azure subscription.
483
+ # @param account_name [String] The Media Services account name.
484
+ # @param content_key_policy_name [String] The Content Key Policy name.
485
+ # @param parameters [ContentKeyPolicy] The request parameters
486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
487
+ # will be added to the HTTP request.
488
+ #
489
+ # @return [ContentKeyPolicy] operation results.
490
+ #
491
+ def update(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:nil)
492
+ response = update_async(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:custom_headers).value!
493
+ response.body unless response.nil?
494
+ end
495
+
496
+ #
497
+ # Update a Content Key Policy
498
+ #
499
+ # Updates an existing Content Key Policy in the Media Services account
500
+ #
501
+ # @param resource_group_name [String] The name of the resource group within the
502
+ # Azure subscription.
503
+ # @param account_name [String] The Media Services account name.
504
+ # @param content_key_policy_name [String] The Content Key Policy name.
505
+ # @param parameters [ContentKeyPolicy] The request parameters
506
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
507
+ # will be added to the HTTP request.
508
+ #
509
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
510
+ #
511
+ def update_with_http_info(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:nil)
512
+ update_async(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:custom_headers).value!
513
+ end
514
+
515
+ #
516
+ # Update a Content Key Policy
517
+ #
518
+ # Updates an existing Content Key Policy in the Media Services account
519
+ #
520
+ # @param resource_group_name [String] The name of the resource group within the
521
+ # Azure subscription.
522
+ # @param account_name [String] The Media Services account name.
523
+ # @param content_key_policy_name [String] The Content Key Policy name.
524
+ # @param parameters [ContentKeyPolicy] The request parameters
525
+ # @param [Hash{String => String}] A hash of custom headers that will be added
526
+ # to the HTTP request.
527
+ #
528
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
529
+ #
530
+ def update_async(resource_group_name, account_name, content_key_policy_name, parameters, custom_headers:nil)
531
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
532
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
533
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
534
+ fail ArgumentError, 'content_key_policy_name is nil' if content_key_policy_name.nil?
535
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
536
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
537
+
538
+
539
+ request_headers = {}
540
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
541
+
542
+ # Set Headers
543
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
544
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
545
+
546
+ # Serialize Request
547
+ request_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicy.mapper()
548
+ request_content = @client.serialize(request_mapper, parameters)
549
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
550
+
551
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}'
552
+
553
+ request_url = @base_url || @client.base_url
554
+
555
+ options = {
556
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
557
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'contentKeyPolicyName' => content_key_policy_name},
558
+ query_params: {'api-version' => @client.api_version},
559
+ body: request_content,
560
+ headers: request_headers.merge(custom_headers || {}),
561
+ base_url: request_url
562
+ }
563
+ promise = @client.make_request_async(:patch, path_template, options)
564
+
565
+ promise = promise.then do |result|
566
+ http_response = result.response
567
+ status_code = http_response.status
568
+ response_content = http_response.body
569
+ unless status_code == 200
570
+ error_model = JSON.load(response_content)
571
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
572
+ end
573
+
574
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
575
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
576
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
577
+ # Deserialize Response
578
+ if status_code == 200
579
+ begin
580
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
581
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicy.mapper()
582
+ result.body = @client.deserialize(result_mapper, parsed_response)
583
+ rescue Exception => e
584
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
585
+ end
586
+ end
587
+
588
+ result
589
+ end
590
+
591
+ promise.execute
592
+ end
593
+
594
+ #
595
+ # Get a Content Key Policy with secrets
596
+ #
597
+ # Get a Content Key Policy including secret values
598
+ #
599
+ # @param resource_group_name [String] The name of the resource group within the
600
+ # Azure subscription.
601
+ # @param account_name [String] The Media Services account name.
602
+ # @param content_key_policy_name [String] The Content Key Policy name.
603
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
604
+ # will be added to the HTTP request.
605
+ #
606
+ # @return [ContentKeyPolicyProperties] operation results.
607
+ #
608
+ def get_policy_properties_with_secrets(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
609
+ response = get_policy_properties_with_secrets_async(resource_group_name, account_name, content_key_policy_name, custom_headers:custom_headers).value!
610
+ response.body unless response.nil?
611
+ end
612
+
613
+ #
614
+ # Get a Content Key Policy with secrets
615
+ #
616
+ # Get a Content Key Policy including secret values
617
+ #
618
+ # @param resource_group_name [String] The name of the resource group within the
619
+ # Azure subscription.
620
+ # @param account_name [String] The Media Services account name.
621
+ # @param content_key_policy_name [String] The Content Key Policy name.
622
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
623
+ # will be added to the HTTP request.
624
+ #
625
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
626
+ #
627
+ def get_policy_properties_with_secrets_with_http_info(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
628
+ get_policy_properties_with_secrets_async(resource_group_name, account_name, content_key_policy_name, custom_headers:custom_headers).value!
629
+ end
630
+
631
+ #
632
+ # Get a Content Key Policy with secrets
633
+ #
634
+ # Get a Content Key Policy including secret values
635
+ #
636
+ # @param resource_group_name [String] The name of the resource group within the
637
+ # Azure subscription.
638
+ # @param account_name [String] The Media Services account name.
639
+ # @param content_key_policy_name [String] The Content Key Policy name.
640
+ # @param [Hash{String => String}] A hash of custom headers that will be added
641
+ # to the HTTP request.
642
+ #
643
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
644
+ #
645
+ def get_policy_properties_with_secrets_async(resource_group_name, account_name, content_key_policy_name, custom_headers:nil)
646
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
647
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
648
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
649
+ fail ArgumentError, 'content_key_policy_name is nil' if content_key_policy_name.nil?
650
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
651
+
652
+
653
+ request_headers = {}
654
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
655
+
656
+ # Set Headers
657
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
658
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
659
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}/getPolicyPropertiesWithSecrets'
660
+
661
+ request_url = @base_url || @client.base_url
662
+
663
+ options = {
664
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
665
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'contentKeyPolicyName' => content_key_policy_name},
666
+ query_params: {'api-version' => @client.api_version},
667
+ headers: request_headers.merge(custom_headers || {}),
668
+ base_url: request_url
669
+ }
670
+ promise = @client.make_request_async(:post, path_template, options)
671
+
672
+ promise = promise.then do |result|
673
+ http_response = result.response
674
+ status_code = http_response.status
675
+ response_content = http_response.body
676
+ unless status_code == 200 || status_code == 404
677
+ error_model = JSON.load(response_content)
678
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
679
+ end
680
+
681
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
682
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
683
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
684
+ # Deserialize Response
685
+ if status_code == 200
686
+ begin
687
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
688
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicyProperties.mapper()
689
+ result.body = @client.deserialize(result_mapper, parsed_response)
690
+ rescue Exception => e
691
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
692
+ end
693
+ end
694
+
695
+ result
696
+ end
697
+
698
+ promise.execute
699
+ end
700
+
701
+ #
702
+ # List Content Key Policies
703
+ #
704
+ # Lists the Content Key Policies in the account
705
+ #
706
+ # @param next_page_link [String] The NextLink from the previous successful call
707
+ # to List operation.
708
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
709
+ # will be added to the HTTP request.
710
+ #
711
+ # @return [ContentKeyPolicyCollection] operation results.
712
+ #
713
+ def list_next(next_page_link, custom_headers:nil)
714
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
715
+ response.body unless response.nil?
716
+ end
717
+
718
+ #
719
+ # List Content Key Policies
720
+ #
721
+ # Lists the Content Key Policies in the account
722
+ #
723
+ # @param next_page_link [String] The NextLink from the previous successful call
724
+ # to List operation.
725
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
726
+ # will be added to the HTTP request.
727
+ #
728
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
729
+ #
730
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
731
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
732
+ end
733
+
734
+ #
735
+ # List Content Key Policies
736
+ #
737
+ # Lists the Content Key Policies in the account
738
+ #
739
+ # @param next_page_link [String] The NextLink from the previous successful call
740
+ # to List operation.
741
+ # @param [Hash{String => String}] A hash of custom headers that will be added
742
+ # to the HTTP request.
743
+ #
744
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
745
+ #
746
+ def list_next_async(next_page_link, custom_headers:nil)
747
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
748
+
749
+
750
+ request_headers = {}
751
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
752
+
753
+ # Set Headers
754
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
755
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
756
+ path_template = '{nextLink}'
757
+
758
+ request_url = @base_url || @client.base_url
759
+
760
+ options = {
761
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
762
+ skip_encoding_path_params: {'nextLink' => next_page_link},
763
+ headers: request_headers.merge(custom_headers || {}),
764
+ base_url: request_url
765
+ }
766
+ promise = @client.make_request_async(:get, path_template, options)
767
+
768
+ promise = promise.then do |result|
769
+ http_response = result.response
770
+ status_code = http_response.status
771
+ response_content = http_response.body
772
+ unless status_code == 200
773
+ error_model = JSON.load(response_content)
774
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
775
+ end
776
+
777
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
778
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
779
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
780
+ # Deserialize Response
781
+ if status_code == 200
782
+ begin
783
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
784
+ result_mapper = Azure::MediaServices::Mgmt::V2020_05_01::Models::ContentKeyPolicyCollection.mapper()
785
+ result.body = @client.deserialize(result_mapper, parsed_response)
786
+ rescue Exception => e
787
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
788
+ end
789
+ end
790
+
791
+ result
792
+ end
793
+
794
+ promise.execute
795
+ end
796
+
797
+ #
798
+ # List Content Key Policies
799
+ #
800
+ # Lists the Content Key Policies in the account
801
+ #
802
+ # @param resource_group_name [String] The name of the resource group within the
803
+ # Azure subscription.
804
+ # @param account_name [String] The Media Services account name.
805
+ # @param filter [String] Restricts the set of items returned.
806
+ # @param top [Integer] Specifies a non-negative integer n that limits the
807
+ # number of items returned from a collection. The service returns the number of
808
+ # available items up to but not greater than the specified value n.
809
+ # @param orderby [String] Specifies the key by which the result collection
810
+ # should be ordered.
811
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
812
+ # will be added to the HTTP request.
813
+ #
814
+ # @return [ContentKeyPolicyCollection] which provide lazy access to pages of
815
+ # the response.
816
+ #
817
+ def list_as_lazy(resource_group_name, account_name, filter:nil, top:nil, orderby:nil, custom_headers:nil)
818
+ response = list_async(resource_group_name, account_name, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
819
+ unless response.nil?
820
+ page = response.body
821
+ page.next_method = Proc.new do |next_page_link|
822
+ list_next_async(next_page_link, custom_headers:custom_headers)
823
+ end
824
+ page
825
+ end
826
+ end
827
+
828
+ end
829
+ end