azure_mgmt_container_registry 0.18.2 → 0.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2016-06-27-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  3. data/lib/2016-06-27-preview/generated/azure_mgmt_container_registry/registries.rb +22 -0
  4. data/lib/2017-03-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  5. data/lib/2017-03-01/generated/azure_mgmt_container_registry/operations.rb +4 -0
  6. data/lib/2017-03-01/generated/azure_mgmt_container_registry/registries.rb +22 -0
  7. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  8. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/operations.rb +4 -0
  9. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/registries.rb +24 -0
  10. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/replications.rb +12 -0
  11. data/lib/2017-06-01-preview/generated/azure_mgmt_container_registry/webhooks.rb +20 -0
  12. data/lib/2017-10-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  13. data/lib/2017-10-01/generated/azure_mgmt_container_registry/operations.rb +4 -0
  14. data/lib/2017-10-01/generated/azure_mgmt_container_registry/registries.rb +30 -0
  15. data/lib/2017-10-01/generated/azure_mgmt_container_registry/replications.rb +12 -0
  16. data/lib/2017-10-01/generated/azure_mgmt_container_registry/webhooks.rb +20 -0
  17. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_steps.rb +16 -0
  18. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/build_tasks.rb +14 -0
  19. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/builds.rb +12 -0
  20. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  21. data/lib/2018-02-01-preview/generated/azure_mgmt_container_registry/registries.rb +4 -0
  22. data/lib/2018-09-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  23. data/lib/2018-09-01/generated/azure_mgmt_container_registry/models/base_image_trigger.rb +2 -1
  24. data/lib/2018-09-01/generated/azure_mgmt_container_registry/models/base_image_trigger_update_parameters.rb +2 -1
  25. data/lib/2018-09-01/generated/azure_mgmt_container_registry/models/source_trigger.rb +2 -1
  26. data/lib/2018-09-01/generated/azure_mgmt_container_registry/models/source_trigger_update_parameters.rb +2 -1
  27. data/lib/2018-09-01/generated/azure_mgmt_container_registry/registries.rb +4 -0
  28. data/lib/2018-09-01/generated/azure_mgmt_container_registry/runs.rb +12 -0
  29. data/lib/2018-09-01/generated/azure_mgmt_container_registry/tasks.rb +14 -0
  30. data/lib/2019-04-01/generated/azure_mgmt_container_registry.rb +7 -6
  31. data/lib/2019-04-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +1 -1
  32. data/lib/2019-04-01/generated/azure_mgmt_container_registry/models/run.rb +12 -0
  33. data/lib/2019-04-01/generated/azure_mgmt_container_registry/models/timer_trigger_descriptor.rb +58 -0
  34. data/lib/2019-04-01/generated/azure_mgmt_container_registry/registries.rb +4 -0
  35. data/lib/2019-04-01/generated/azure_mgmt_container_registry/runs.rb +12 -0
  36. data/lib/2019-04-01/generated/azure_mgmt_container_registry/tasks.rb +14 -0
  37. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry.rb +46 -0
  38. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +139 -0
  39. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/generate_credentials_parameters.rb +75 -0
  40. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/generate_credentials_result.rb +67 -0
  41. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/provisioning_state.rb +20 -0
  42. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/proxy_resource.rb +72 -0
  43. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/scope_map.rb +133 -0
  44. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/scope_map_list_result.rb +101 -0
  45. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/scope_map_update_parameters.rb +68 -0
  46. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/status.rb +16 -0
  47. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token.rb +137 -0
  48. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_certificate.rb +81 -0
  49. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_certificate_name.rb +16 -0
  50. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_credentials_properties.rb +76 -0
  51. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_list_result.rb +101 -0
  52. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_password.rb +82 -0
  53. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_password_name.rb +16 -0
  54. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/models/token_update_parameters.rb +72 -0
  55. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/module_definition.rb +9 -0
  56. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/registries.rb +188 -0
  57. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/scope_maps.rb +850 -0
  58. data/lib/2019-05-01-preview/generated/azure_mgmt_container_registry/tokens.rb +844 -0
  59. data/lib/2019-05-01/generated/azure_mgmt_container_registry.rb +90 -0
  60. data/lib/2019-05-01/generated/azure_mgmt_container_registry/container_registry_management_client.rb +143 -0
  61. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/action.rb +15 -0
  62. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/actor.rb +48 -0
  63. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/callback_config.rb +66 -0
  64. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/default_action.rb +16 -0
  65. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event.rb +69 -0
  66. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_content.rb +120 -0
  67. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_info.rb +46 -0
  68. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_list_result.rb +101 -0
  69. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_request_message.rb +101 -0
  70. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/event_response_message.rb +99 -0
  71. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/import_image_parameters.rb +104 -0
  72. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/import_mode.rb +16 -0
  73. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/import_source.rb +89 -0
  74. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/import_source_credentials.rb +59 -0
  75. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/iprule.rb +60 -0
  76. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/network_rule_set.rb +89 -0
  77. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_definition.rb +84 -0
  78. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_display_definition.rb +80 -0
  79. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_list_result.rb +101 -0
  80. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_metric_specification_definition.rb +101 -0
  81. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/operation_service_specification_definition.rb +56 -0
  82. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/password_name.rb +16 -0
  83. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/policies.rb +74 -0
  84. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/policy_status.rb +16 -0
  85. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/provisioning_state.rb +20 -0
  86. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/quarantine_policy.rb +47 -0
  87. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/regenerate_credential_parameters.rb +49 -0
  88. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry.rb +202 -0
  89. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_list_credentials_result.rb +67 -0
  90. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_list_result.rb +101 -0
  91. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_name_check_request.rb +66 -0
  92. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_name_status.rb +71 -0
  93. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_password.rb +59 -0
  94. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_update_parameters.rb +102 -0
  95. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_usage.rb +80 -0
  96. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_usage_list_result.rb +56 -0
  97. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/registry_usage_unit.rb +16 -0
  98. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/replication.rb +114 -0
  99. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/replication_list_result.rb +101 -0
  100. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/replication_update_parameters.rb +54 -0
  101. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/request.rb +93 -0
  102. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/resource.rb +111 -0
  103. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/retention_policy.rb +71 -0
  104. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/sku.rb +61 -0
  105. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/sku_name.rb +18 -0
  106. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/sku_tier.rb +18 -0
  107. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/source.rb +61 -0
  108. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/status.rb +73 -0
  109. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/storage_account_properties.rb +47 -0
  110. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/target.rb +137 -0
  111. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/trust_policy.rb +59 -0
  112. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/trust_policy_type.rb +15 -0
  113. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/virtual_network_rule.rb +60 -0
  114. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook.rb +146 -0
  115. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_action.rb +19 -0
  116. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_create_parameters.rb +143 -0
  117. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_list_result.rb +101 -0
  118. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_status.rb +16 -0
  119. data/lib/2019-05-01/generated/azure_mgmt_container_registry/models/webhook_update_parameters.rb +131 -0
  120. data/lib/2019-05-01/generated/azure_mgmt_container_registry/module_definition.rb +9 -0
  121. data/lib/2019-05-01/generated/azure_mgmt_container_registry/operations.rb +219 -0
  122. data/lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb +1580 -0
  123. data/lib/2019-05-01/generated/azure_mgmt_container_registry/replications.rb +845 -0
  124. data/lib/2019-05-01/generated/azure_mgmt_container_registry/webhooks.rb +1287 -0
  125. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry.rb +100 -0
  126. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/container_registry_management_client.rb +139 -0
  127. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/agent_properties.rb +47 -0
  128. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/architecture.rb +19 -0
  129. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/argument.rb +70 -0
  130. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/auth_info.rb +92 -0
  131. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/auth_info_update_parameters.rb +92 -0
  132. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_dependency.rb +91 -0
  133. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_dependency_type.rb +16 -0
  134. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_trigger.rb +94 -0
  135. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_trigger_type.rb +16 -0
  136. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/base_image_trigger_update_parameters.rb +94 -0
  137. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/credentials.rb +74 -0
  138. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/custom_registry_credentials.rb +82 -0
  139. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/docker_build_request.rb +218 -0
  140. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/docker_build_step.rb +175 -0
  141. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/docker_build_step_update_parameters.rb +154 -0
  142. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/encoded_task_run_request.rb +172 -0
  143. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/encoded_task_step.rb +129 -0
  144. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/encoded_task_step_update_parameters.rb +111 -0
  145. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/file_task_run_request.rb +172 -0
  146. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/file_task_step.rb +129 -0
  147. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/file_task_step_update_parameters.rb +111 -0
  148. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/identity_properties.rb +95 -0
  149. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/image_descriptor.rb +79 -0
  150. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/image_update_trigger.rb +78 -0
  151. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/os.rb +16 -0
  152. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/override_task_step_properties.rb +125 -0
  153. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/platform_properties.rb +71 -0
  154. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/platform_update_parameters.rb +71 -0
  155. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/provisioning_state.rb +20 -0
  156. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/proxy_resource.rb +72 -0
  157. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/resource.rb +111 -0
  158. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/resource_identity_type.rb +18 -0
  159. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run.rb +320 -0
  160. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_filter.rb +129 -0
  161. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_get_log_result.rb +47 -0
  162. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_list_result.rb +99 -0
  163. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_request.rb +62 -0
  164. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_status.rb +22 -0
  165. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_type.rb +18 -0
  166. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/run_update_parameters.rb +47 -0
  167. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/secret_object.rb +63 -0
  168. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/secret_object_type.rb +16 -0
  169. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/set_value.rb +71 -0
  170. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_control_type.rb +16 -0
  171. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_properties.rb +83 -0
  172. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_registry_credentials.rb +52 -0
  173. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_registry_login_mode.rb +16 -0
  174. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_trigger.rb +92 -0
  175. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_trigger_descriptor.rb +112 -0
  176. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_trigger_event.rb +16 -0
  177. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_trigger_update_parameters.rb +92 -0
  178. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_update_parameters.rb +83 -0
  179. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/source_upload_definition.rb +58 -0
  180. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task.rb +218 -0
  181. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_list_result.rb +99 -0
  182. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_run_request.rb +84 -0
  183. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_status.rb +16 -0
  184. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_step_properties.rb +94 -0
  185. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_step_update_parameters.rb +72 -0
  186. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/task_update_parameters.rb +155 -0
  187. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/timer_trigger.rb +70 -0
  188. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/timer_trigger_descriptor.rb +58 -0
  189. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/timer_trigger_update_parameters.rb +70 -0
  190. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/token_type.rb +16 -0
  191. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/trigger_properties.rb +89 -0
  192. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/trigger_status.rb +16 -0
  193. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/trigger_update_parameters.rb +90 -0
  194. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/update_trigger_payload_type.rb +16 -0
  195. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/user_identity_properties.rb +58 -0
  196. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/models/variant.rb +17 -0
  197. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/module_definition.rb +9 -0
  198. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/registries.rb +293 -0
  199. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/runs.rb +778 -0
  200. data/lib/2019-06-01-preview/generated/azure_mgmt_container_registry/tasks.rb +952 -0
  201. data/lib/azure_mgmt_container_registry.rb +3 -0
  202. data/lib/profiles/latest/modules/containerregistry_profile_module.rb +321 -305
  203. data/lib/version.rb +1 -1
  204. metadata +170 -5
@@ -0,0 +1,1580 @@
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::ContainerRegistry::Mgmt::V2019_05_01
7
+ #
8
+ # Registries
9
+ #
10
+ class Registries
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Registries class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerRegistryManagementClient] reference to the ContainerRegistryManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Copies an image to this container registry from the specified container
26
+ # registry.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group to which
29
+ # the container registry belongs.
30
+ # @param registry_name [String] The name of the container registry.
31
+ # @param parameters [ImportImageParameters] The parameters specifying the image
32
+ # to copy and the source container registry.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ def import_image(resource_group_name, registry_name, parameters, custom_headers:nil)
37
+ response = import_image_async(resource_group_name, registry_name, parameters, custom_headers:custom_headers).value!
38
+ nil
39
+ end
40
+
41
+ #
42
+ # @param resource_group_name [String] The name of the resource group to which
43
+ # the container registry belongs.
44
+ # @param registry_name [String] The name of the container registry.
45
+ # @param parameters [ImportImageParameters] The parameters specifying the image
46
+ # to copy and the source container registry.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [Concurrent::Promise] promise which provides async access to http
51
+ # response.
52
+ #
53
+ def import_image_async(resource_group_name, registry_name, parameters, custom_headers:nil)
54
+ # Send request
55
+ promise = begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers:custom_headers)
56
+
57
+ promise = promise.then do |response|
58
+ # Defining deserialization method.
59
+ deserialize_method = lambda do |parsed_response|
60
+ end
61
+
62
+ # Waiting for response.
63
+ @client.get_long_running_operation_result(response, deserialize_method)
64
+ end
65
+
66
+ promise
67
+ end
68
+
69
+ #
70
+ # Checks whether the container registry name is available for use. The name
71
+ # must contain only alphanumeric characters, be globally unique, and between 5
72
+ # and 50 characters in length.
73
+ #
74
+ # @param registry_name_check_request [RegistryNameCheckRequest] The object
75
+ # containing information for the availability request.
76
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
77
+ # will be added to the HTTP request.
78
+ #
79
+ # @return [RegistryNameStatus] operation results.
80
+ #
81
+ def check_name_availability(registry_name_check_request, custom_headers:nil)
82
+ response = check_name_availability_async(registry_name_check_request, custom_headers:custom_headers).value!
83
+ response.body unless response.nil?
84
+ end
85
+
86
+ #
87
+ # Checks whether the container registry name is available for use. The name
88
+ # must contain only alphanumeric characters, be globally unique, and between 5
89
+ # and 50 characters in length.
90
+ #
91
+ # @param registry_name_check_request [RegistryNameCheckRequest] The object
92
+ # containing information for the availability request.
93
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
94
+ # will be added to the HTTP request.
95
+ #
96
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
97
+ #
98
+ def check_name_availability_with_http_info(registry_name_check_request, custom_headers:nil)
99
+ check_name_availability_async(registry_name_check_request, custom_headers:custom_headers).value!
100
+ end
101
+
102
+ #
103
+ # Checks whether the container registry name is available for use. The name
104
+ # must contain only alphanumeric characters, be globally unique, and between 5
105
+ # and 50 characters in length.
106
+ #
107
+ # @param registry_name_check_request [RegistryNameCheckRequest] The object
108
+ # containing information for the availability request.
109
+ # @param [Hash{String => String}] A hash of custom headers that will be added
110
+ # to the HTTP request.
111
+ #
112
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
113
+ #
114
+ def check_name_availability_async(registry_name_check_request, custom_headers:nil)
115
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
116
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
117
+ fail ArgumentError, 'registry_name_check_request is nil' if registry_name_check_request.nil?
118
+
119
+
120
+ request_headers = {}
121
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
122
+
123
+ # Set Headers
124
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
125
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
126
+
127
+ # Serialize Request
128
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryNameCheckRequest.mapper()
129
+ request_content = @client.serialize(request_mapper, registry_name_check_request)
130
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
131
+
132
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability'
133
+
134
+ request_url = @base_url || @client.base_url
135
+
136
+ options = {
137
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
138
+ path_params: {'subscriptionId' => @client.subscription_id},
139
+ query_params: {'api-version' => @client.api_version},
140
+ body: request_content,
141
+ headers: request_headers.merge(custom_headers || {}),
142
+ base_url: request_url
143
+ }
144
+ promise = @client.make_request_async(:post, path_template, options)
145
+
146
+ promise = promise.then do |result|
147
+ http_response = result.response
148
+ status_code = http_response.status
149
+ response_content = http_response.body
150
+ unless status_code == 200
151
+ error_model = JSON.load(response_content)
152
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
153
+ end
154
+
155
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
156
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
157
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
158
+ # Deserialize Response
159
+ if status_code == 200
160
+ begin
161
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
162
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryNameStatus.mapper()
163
+ result.body = @client.deserialize(result_mapper, parsed_response)
164
+ rescue Exception => e
165
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
166
+ end
167
+ end
168
+
169
+ result
170
+ end
171
+
172
+ promise.execute
173
+ end
174
+
175
+ #
176
+ # Gets the properties of the specified container registry.
177
+ #
178
+ # @param resource_group_name [String] The name of the resource group to which
179
+ # the container registry belongs.
180
+ # @param registry_name [String] The name of the container registry.
181
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
182
+ # will be added to the HTTP request.
183
+ #
184
+ # @return [Registry] operation results.
185
+ #
186
+ def get(resource_group_name, registry_name, custom_headers:nil)
187
+ response = get_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
188
+ response.body unless response.nil?
189
+ end
190
+
191
+ #
192
+ # Gets the properties of the specified container registry.
193
+ #
194
+ # @param resource_group_name [String] The name of the resource group to which
195
+ # the container registry belongs.
196
+ # @param registry_name [String] The name of the container registry.
197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
198
+ # will be added to the HTTP request.
199
+ #
200
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
201
+ #
202
+ def get_with_http_info(resource_group_name, registry_name, custom_headers:nil)
203
+ get_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
204
+ end
205
+
206
+ #
207
+ # Gets the properties of the specified container registry.
208
+ #
209
+ # @param resource_group_name [String] The name of the resource group to which
210
+ # the container registry belongs.
211
+ # @param registry_name [String] The name of the container registry.
212
+ # @param [Hash{String => String}] A hash of custom headers that will be added
213
+ # to the HTTP request.
214
+ #
215
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
216
+ #
217
+ def get_async(resource_group_name, registry_name, custom_headers:nil)
218
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
219
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
220
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
221
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
222
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
223
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
224
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
225
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
226
+
227
+
228
+ request_headers = {}
229
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
230
+
231
+ # Set Headers
232
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
233
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
234
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'
235
+
236
+ request_url = @base_url || @client.base_url
237
+
238
+ options = {
239
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
240
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
241
+ query_params: {'api-version' => @client.api_version},
242
+ headers: request_headers.merge(custom_headers || {}),
243
+ base_url: request_url
244
+ }
245
+ promise = @client.make_request_async(:get, path_template, options)
246
+
247
+ promise = promise.then do |result|
248
+ http_response = result.response
249
+ status_code = http_response.status
250
+ response_content = http_response.body
251
+ unless status_code == 200
252
+ error_model = JSON.load(response_content)
253
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
254
+ end
255
+
256
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
257
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
258
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
259
+ # Deserialize Response
260
+ if status_code == 200
261
+ begin
262
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
263
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper()
264
+ result.body = @client.deserialize(result_mapper, parsed_response)
265
+ rescue Exception => e
266
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
267
+ end
268
+ end
269
+
270
+ result
271
+ end
272
+
273
+ promise.execute
274
+ end
275
+
276
+ #
277
+ # Creates a container registry with the specified parameters.
278
+ #
279
+ # @param resource_group_name [String] The name of the resource group to which
280
+ # the container registry belongs.
281
+ # @param registry_name [String] The name of the container registry.
282
+ # @param registry [Registry] The parameters for creating a container registry.
283
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
284
+ # will be added to the HTTP request.
285
+ #
286
+ # @return [Registry] operation results.
287
+ #
288
+ def create(resource_group_name, registry_name, registry, custom_headers:nil)
289
+ response = create_async(resource_group_name, registry_name, registry, custom_headers:custom_headers).value!
290
+ response.body unless response.nil?
291
+ end
292
+
293
+ #
294
+ # @param resource_group_name [String] The name of the resource group to which
295
+ # the container registry belongs.
296
+ # @param registry_name [String] The name of the container registry.
297
+ # @param registry [Registry] The parameters for creating a container registry.
298
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
299
+ # will be added to the HTTP request.
300
+ #
301
+ # @return [Concurrent::Promise] promise which provides async access to http
302
+ # response.
303
+ #
304
+ def create_async(resource_group_name, registry_name, registry, custom_headers:nil)
305
+ # Send request
306
+ promise = begin_create_async(resource_group_name, registry_name, registry, custom_headers:custom_headers)
307
+
308
+ promise = promise.then do |response|
309
+ # Defining deserialization method.
310
+ deserialize_method = lambda do |parsed_response|
311
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper()
312
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
313
+ end
314
+
315
+ # Waiting for response.
316
+ @client.get_long_running_operation_result(response, deserialize_method)
317
+ end
318
+
319
+ promise
320
+ end
321
+
322
+ #
323
+ # Deletes a container registry.
324
+ #
325
+ # @param resource_group_name [String] The name of the resource group to which
326
+ # the container registry belongs.
327
+ # @param registry_name [String] The name of the container registry.
328
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
329
+ # will be added to the HTTP request.
330
+ #
331
+ def delete(resource_group_name, registry_name, custom_headers:nil)
332
+ response = delete_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
333
+ nil
334
+ end
335
+
336
+ #
337
+ # @param resource_group_name [String] The name of the resource group to which
338
+ # the container registry belongs.
339
+ # @param registry_name [String] The name of the container registry.
340
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
341
+ # will be added to the HTTP request.
342
+ #
343
+ # @return [Concurrent::Promise] promise which provides async access to http
344
+ # response.
345
+ #
346
+ def delete_async(resource_group_name, registry_name, custom_headers:nil)
347
+ # Send request
348
+ promise = begin_delete_async(resource_group_name, registry_name, custom_headers:custom_headers)
349
+
350
+ promise = promise.then do |response|
351
+ # Defining deserialization method.
352
+ deserialize_method = lambda do |parsed_response|
353
+ end
354
+
355
+ # Waiting for response.
356
+ @client.get_long_running_operation_result(response, deserialize_method)
357
+ end
358
+
359
+ promise
360
+ end
361
+
362
+ #
363
+ # Updates a container registry with the specified parameters.
364
+ #
365
+ # @param resource_group_name [String] The name of the resource group to which
366
+ # the container registry belongs.
367
+ # @param registry_name [String] The name of the container registry.
368
+ # @param registry_update_parameters [RegistryUpdateParameters] The parameters
369
+ # for updating a container registry.
370
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
371
+ # will be added to the HTTP request.
372
+ #
373
+ # @return [Registry] operation results.
374
+ #
375
+ def update(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
376
+ response = update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value!
377
+ response.body unless response.nil?
378
+ end
379
+
380
+ #
381
+ # @param resource_group_name [String] The name of the resource group to which
382
+ # the container registry belongs.
383
+ # @param registry_name [String] The name of the container registry.
384
+ # @param registry_update_parameters [RegistryUpdateParameters] The parameters
385
+ # for updating a container registry.
386
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
387
+ # will be added to the HTTP request.
388
+ #
389
+ # @return [Concurrent::Promise] promise which provides async access to http
390
+ # response.
391
+ #
392
+ def update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
393
+ # Send request
394
+ promise = begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers)
395
+
396
+ promise = promise.then do |response|
397
+ # Defining deserialization method.
398
+ deserialize_method = lambda do |parsed_response|
399
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper()
400
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
401
+ end
402
+
403
+ # Waiting for response.
404
+ @client.get_long_running_operation_result(response, deserialize_method)
405
+ end
406
+
407
+ promise
408
+ end
409
+
410
+ #
411
+ # Lists all the container registries under the specified resource group.
412
+ #
413
+ # @param resource_group_name [String] The name of the resource group to which
414
+ # the container registry belongs.
415
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
416
+ # will be added to the HTTP request.
417
+ #
418
+ # @return [Array<Registry>] operation results.
419
+ #
420
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
421
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
422
+ first_page.get_all_items
423
+ end
424
+
425
+ #
426
+ # Lists all the container registries under the specified resource group.
427
+ #
428
+ # @param resource_group_name [String] The name of the resource group to which
429
+ # the container registry belongs.
430
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
431
+ # will be added to the HTTP request.
432
+ #
433
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
434
+ #
435
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
436
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
437
+ end
438
+
439
+ #
440
+ # Lists all the container registries under the specified resource group.
441
+ #
442
+ # @param resource_group_name [String] The name of the resource group to which
443
+ # the container registry belongs.
444
+ # @param [Hash{String => String}] A hash of custom headers that will be added
445
+ # to the HTTP request.
446
+ #
447
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
448
+ #
449
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
450
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
451
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
452
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
453
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
454
+
455
+
456
+ request_headers = {}
457
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
458
+
459
+ # Set Headers
460
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
461
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
462
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries'
463
+
464
+ request_url = @base_url || @client.base_url
465
+
466
+ options = {
467
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
468
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
469
+ query_params: {'api-version' => @client.api_version},
470
+ headers: request_headers.merge(custom_headers || {}),
471
+ base_url: request_url
472
+ }
473
+ promise = @client.make_request_async(:get, path_template, options)
474
+
475
+ promise = promise.then do |result|
476
+ http_response = result.response
477
+ status_code = http_response.status
478
+ response_content = http_response.body
479
+ unless status_code == 200
480
+ error_model = JSON.load(response_content)
481
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
482
+ end
483
+
484
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
485
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
486
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
487
+ # Deserialize Response
488
+ if status_code == 200
489
+ begin
490
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
491
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListResult.mapper()
492
+ result.body = @client.deserialize(result_mapper, parsed_response)
493
+ rescue Exception => e
494
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
495
+ end
496
+ end
497
+
498
+ result
499
+ end
500
+
501
+ promise.execute
502
+ end
503
+
504
+ #
505
+ # Lists all the container registries under the specified subscription.
506
+ #
507
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
508
+ # will be added to the HTTP request.
509
+ #
510
+ # @return [Array<Registry>] operation results.
511
+ #
512
+ def list(custom_headers:nil)
513
+ first_page = list_as_lazy(custom_headers:custom_headers)
514
+ first_page.get_all_items
515
+ end
516
+
517
+ #
518
+ # Lists all the container registries under the specified subscription.
519
+ #
520
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
521
+ # will be added to the HTTP request.
522
+ #
523
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
524
+ #
525
+ def list_with_http_info(custom_headers:nil)
526
+ list_async(custom_headers:custom_headers).value!
527
+ end
528
+
529
+ #
530
+ # Lists all the container registries under the specified subscription.
531
+ #
532
+ # @param [Hash{String => String}] A hash of custom headers that will be added
533
+ # to the HTTP request.
534
+ #
535
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
536
+ #
537
+ def list_async(custom_headers:nil)
538
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
539
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
540
+
541
+
542
+ request_headers = {}
543
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
544
+
545
+ # Set Headers
546
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
547
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
548
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries'
549
+
550
+ request_url = @base_url || @client.base_url
551
+
552
+ options = {
553
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
554
+ path_params: {'subscriptionId' => @client.subscription_id},
555
+ query_params: {'api-version' => @client.api_version},
556
+ headers: request_headers.merge(custom_headers || {}),
557
+ base_url: request_url
558
+ }
559
+ promise = @client.make_request_async(:get, path_template, options)
560
+
561
+ promise = promise.then do |result|
562
+ http_response = result.response
563
+ status_code = http_response.status
564
+ response_content = http_response.body
565
+ unless status_code == 200
566
+ error_model = JSON.load(response_content)
567
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
568
+ end
569
+
570
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
571
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
572
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
573
+ # Deserialize Response
574
+ if status_code == 200
575
+ begin
576
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
577
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListResult.mapper()
578
+ result.body = @client.deserialize(result_mapper, parsed_response)
579
+ rescue Exception => e
580
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
581
+ end
582
+ end
583
+
584
+ result
585
+ end
586
+
587
+ promise.execute
588
+ end
589
+
590
+ #
591
+ # Lists the login credentials for the specified container registry.
592
+ #
593
+ # @param resource_group_name [String] The name of the resource group to which
594
+ # the container registry belongs.
595
+ # @param registry_name [String] The name of the container registry.
596
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
597
+ # will be added to the HTTP request.
598
+ #
599
+ # @return [RegistryListCredentialsResult] operation results.
600
+ #
601
+ def list_credentials(resource_group_name, registry_name, custom_headers:nil)
602
+ response = list_credentials_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
603
+ response.body unless response.nil?
604
+ end
605
+
606
+ #
607
+ # Lists the login credentials for the specified container registry.
608
+ #
609
+ # @param resource_group_name [String] The name of the resource group to which
610
+ # the container registry belongs.
611
+ # @param registry_name [String] The name of the container registry.
612
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
613
+ # will be added to the HTTP request.
614
+ #
615
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
616
+ #
617
+ def list_credentials_with_http_info(resource_group_name, registry_name, custom_headers:nil)
618
+ list_credentials_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
619
+ end
620
+
621
+ #
622
+ # Lists the login credentials for the specified container registry.
623
+ #
624
+ # @param resource_group_name [String] The name of the resource group to which
625
+ # the container registry belongs.
626
+ # @param registry_name [String] The name of the container registry.
627
+ # @param [Hash{String => String}] A hash of custom headers that will be added
628
+ # to the HTTP request.
629
+ #
630
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
631
+ #
632
+ def list_credentials_async(resource_group_name, registry_name, custom_headers:nil)
633
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
634
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
635
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
636
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
637
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
638
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
639
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
640
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
641
+
642
+
643
+ request_headers = {}
644
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
645
+
646
+ # Set Headers
647
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
648
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
649
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials'
650
+
651
+ request_url = @base_url || @client.base_url
652
+
653
+ options = {
654
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
655
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
656
+ query_params: {'api-version' => @client.api_version},
657
+ headers: request_headers.merge(custom_headers || {}),
658
+ base_url: request_url
659
+ }
660
+ promise = @client.make_request_async(:post, path_template, options)
661
+
662
+ promise = promise.then do |result|
663
+ http_response = result.response
664
+ status_code = http_response.status
665
+ response_content = http_response.body
666
+ unless status_code == 200
667
+ error_model = JSON.load(response_content)
668
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
669
+ end
670
+
671
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
672
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
673
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
674
+ # Deserialize Response
675
+ if status_code == 200
676
+ begin
677
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
678
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListCredentialsResult.mapper()
679
+ result.body = @client.deserialize(result_mapper, parsed_response)
680
+ rescue Exception => e
681
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
682
+ end
683
+ end
684
+
685
+ result
686
+ end
687
+
688
+ promise.execute
689
+ end
690
+
691
+ #
692
+ # Regenerates one of the login credentials for the specified container
693
+ # registry.
694
+ #
695
+ # @param resource_group_name [String] The name of the resource group to which
696
+ # the container registry belongs.
697
+ # @param registry_name [String] The name of the container registry.
698
+ # @param regenerate_credential_parameters [RegenerateCredentialParameters]
699
+ # Specifies name of the password which should be regenerated -- password or
700
+ # password2.
701
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
702
+ # will be added to the HTTP request.
703
+ #
704
+ # @return [RegistryListCredentialsResult] operation results.
705
+ #
706
+ def regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil)
707
+ response = regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value!
708
+ response.body unless response.nil?
709
+ end
710
+
711
+ #
712
+ # Regenerates one of the login credentials for the specified container
713
+ # registry.
714
+ #
715
+ # @param resource_group_name [String] The name of the resource group to which
716
+ # the container registry belongs.
717
+ # @param registry_name [String] The name of the container registry.
718
+ # @param regenerate_credential_parameters [RegenerateCredentialParameters]
719
+ # Specifies name of the password which should be regenerated -- password or
720
+ # password2.
721
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
722
+ # will be added to the HTTP request.
723
+ #
724
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
725
+ #
726
+ def regenerate_credential_with_http_info(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil)
727
+ regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value!
728
+ end
729
+
730
+ #
731
+ # Regenerates one of the login credentials for the specified container
732
+ # registry.
733
+ #
734
+ # @param resource_group_name [String] The name of the resource group to which
735
+ # the container registry belongs.
736
+ # @param registry_name [String] The name of the container registry.
737
+ # @param regenerate_credential_parameters [RegenerateCredentialParameters]
738
+ # Specifies name of the password which should be regenerated -- password or
739
+ # password2.
740
+ # @param [Hash{String => String}] A hash of custom headers that will be added
741
+ # to the HTTP request.
742
+ #
743
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
744
+ #
745
+ def regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil)
746
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
747
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
748
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
749
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
750
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
751
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
752
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
753
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
754
+ fail ArgumentError, 'regenerate_credential_parameters is nil' if regenerate_credential_parameters.nil?
755
+
756
+
757
+ request_headers = {}
758
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
759
+
760
+ # Set Headers
761
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
762
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
763
+
764
+ # Serialize Request
765
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegenerateCredentialParameters.mapper()
766
+ request_content = @client.serialize(request_mapper, regenerate_credential_parameters)
767
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
768
+
769
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential'
770
+
771
+ request_url = @base_url || @client.base_url
772
+
773
+ options = {
774
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
775
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
776
+ query_params: {'api-version' => @client.api_version},
777
+ body: request_content,
778
+ headers: request_headers.merge(custom_headers || {}),
779
+ base_url: request_url
780
+ }
781
+ promise = @client.make_request_async(:post, path_template, options)
782
+
783
+ promise = promise.then do |result|
784
+ http_response = result.response
785
+ status_code = http_response.status
786
+ response_content = http_response.body
787
+ unless status_code == 200
788
+ error_model = JSON.load(response_content)
789
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
790
+ end
791
+
792
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
793
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
794
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
795
+ # Deserialize Response
796
+ if status_code == 200
797
+ begin
798
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
799
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListCredentialsResult.mapper()
800
+ result.body = @client.deserialize(result_mapper, parsed_response)
801
+ rescue Exception => e
802
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
803
+ end
804
+ end
805
+
806
+ result
807
+ end
808
+
809
+ promise.execute
810
+ end
811
+
812
+ #
813
+ # Gets the quota usages for the specified container registry.
814
+ #
815
+ # @param resource_group_name [String] The name of the resource group to which
816
+ # the container registry belongs.
817
+ # @param registry_name [String] The name of the container registry.
818
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
819
+ # will be added to the HTTP request.
820
+ #
821
+ # @return [RegistryUsageListResult] operation results.
822
+ #
823
+ def list_usages(resource_group_name, registry_name, custom_headers:nil)
824
+ response = list_usages_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
825
+ response.body unless response.nil?
826
+ end
827
+
828
+ #
829
+ # Gets the quota usages for the specified container registry.
830
+ #
831
+ # @param resource_group_name [String] The name of the resource group to which
832
+ # the container registry belongs.
833
+ # @param registry_name [String] The name of the container registry.
834
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
835
+ # will be added to the HTTP request.
836
+ #
837
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
838
+ #
839
+ def list_usages_with_http_info(resource_group_name, registry_name, custom_headers:nil)
840
+ list_usages_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
841
+ end
842
+
843
+ #
844
+ # Gets the quota usages for the specified container registry.
845
+ #
846
+ # @param resource_group_name [String] The name of the resource group to which
847
+ # the container registry belongs.
848
+ # @param registry_name [String] The name of the container registry.
849
+ # @param [Hash{String => String}] A hash of custom headers that will be added
850
+ # to the HTTP request.
851
+ #
852
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
853
+ #
854
+ def list_usages_async(resource_group_name, registry_name, custom_headers:nil)
855
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
856
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
857
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
858
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
859
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
860
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
861
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
862
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
863
+
864
+
865
+ request_headers = {}
866
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
867
+
868
+ # Set Headers
869
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
870
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
871
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages'
872
+
873
+ request_url = @base_url || @client.base_url
874
+
875
+ options = {
876
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
877
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
878
+ query_params: {'api-version' => @client.api_version},
879
+ headers: request_headers.merge(custom_headers || {}),
880
+ base_url: request_url
881
+ }
882
+ promise = @client.make_request_async(:get, path_template, options)
883
+
884
+ promise = promise.then do |result|
885
+ http_response = result.response
886
+ status_code = http_response.status
887
+ response_content = http_response.body
888
+ unless status_code == 200
889
+ error_model = JSON.load(response_content)
890
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
891
+ end
892
+
893
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
894
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
895
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
896
+ # Deserialize Response
897
+ if status_code == 200
898
+ begin
899
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
900
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryUsageListResult.mapper()
901
+ result.body = @client.deserialize(result_mapper, parsed_response)
902
+ rescue Exception => e
903
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
904
+ end
905
+ end
906
+
907
+ result
908
+ end
909
+
910
+ promise.execute
911
+ end
912
+
913
+ #
914
+ # Copies an image to this container registry from the specified container
915
+ # registry.
916
+ #
917
+ # @param resource_group_name [String] The name of the resource group to which
918
+ # the container registry belongs.
919
+ # @param registry_name [String] The name of the container registry.
920
+ # @param parameters [ImportImageParameters] The parameters specifying the image
921
+ # to copy and the source container registry.
922
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
923
+ # will be added to the HTTP request.
924
+ #
925
+ #
926
+ def begin_import_image(resource_group_name, registry_name, parameters, custom_headers:nil)
927
+ response = begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers:custom_headers).value!
928
+ nil
929
+ end
930
+
931
+ #
932
+ # Copies an image to this container registry from the specified container
933
+ # registry.
934
+ #
935
+ # @param resource_group_name [String] The name of the resource group to which
936
+ # the container registry belongs.
937
+ # @param registry_name [String] The name of the container registry.
938
+ # @param parameters [ImportImageParameters] The parameters specifying the image
939
+ # to copy and the source container registry.
940
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
941
+ # will be added to the HTTP request.
942
+ #
943
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
944
+ #
945
+ def begin_import_image_with_http_info(resource_group_name, registry_name, parameters, custom_headers:nil)
946
+ begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers:custom_headers).value!
947
+ end
948
+
949
+ #
950
+ # Copies an image to this container registry from the specified container
951
+ # registry.
952
+ #
953
+ # @param resource_group_name [String] The name of the resource group to which
954
+ # the container registry belongs.
955
+ # @param registry_name [String] The name of the container registry.
956
+ # @param parameters [ImportImageParameters] The parameters specifying the image
957
+ # to copy and the source container registry.
958
+ # @param [Hash{String => String}] A hash of custom headers that will be added
959
+ # to the HTTP request.
960
+ #
961
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
962
+ #
963
+ def begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers:nil)
964
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
965
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
966
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
967
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
968
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
969
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
970
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
971
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
972
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
973
+
974
+
975
+ request_headers = {}
976
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
977
+
978
+ # Set Headers
979
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
980
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
981
+
982
+ # Serialize Request
983
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::ImportImageParameters.mapper()
984
+ request_content = @client.serialize(request_mapper, parameters)
985
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
986
+
987
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage'
988
+
989
+ request_url = @base_url || @client.base_url
990
+
991
+ options = {
992
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
993
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
994
+ query_params: {'api-version' => @client.api_version},
995
+ body: request_content,
996
+ headers: request_headers.merge(custom_headers || {}),
997
+ base_url: request_url
998
+ }
999
+ promise = @client.make_request_async(:post, path_template, options)
1000
+
1001
+ promise = promise.then do |result|
1002
+ http_response = result.response
1003
+ status_code = http_response.status
1004
+ response_content = http_response.body
1005
+ unless status_code == 200 || status_code == 202
1006
+ error_model = JSON.load(response_content)
1007
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1008
+ end
1009
+
1010
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1011
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1012
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1013
+
1014
+ result
1015
+ end
1016
+
1017
+ promise.execute
1018
+ end
1019
+
1020
+ #
1021
+ # Creates a container registry with the specified parameters.
1022
+ #
1023
+ # @param resource_group_name [String] The name of the resource group to which
1024
+ # the container registry belongs.
1025
+ # @param registry_name [String] The name of the container registry.
1026
+ # @param registry [Registry] The parameters for creating a container registry.
1027
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1028
+ # will be added to the HTTP request.
1029
+ #
1030
+ # @return [Registry] operation results.
1031
+ #
1032
+ def begin_create(resource_group_name, registry_name, registry, custom_headers:nil)
1033
+ response = begin_create_async(resource_group_name, registry_name, registry, custom_headers:custom_headers).value!
1034
+ response.body unless response.nil?
1035
+ end
1036
+
1037
+ #
1038
+ # Creates a container registry with the specified parameters.
1039
+ #
1040
+ # @param resource_group_name [String] The name of the resource group to which
1041
+ # the container registry belongs.
1042
+ # @param registry_name [String] The name of the container registry.
1043
+ # @param registry [Registry] The parameters for creating a container registry.
1044
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1045
+ # will be added to the HTTP request.
1046
+ #
1047
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1048
+ #
1049
+ def begin_create_with_http_info(resource_group_name, registry_name, registry, custom_headers:nil)
1050
+ begin_create_async(resource_group_name, registry_name, registry, custom_headers:custom_headers).value!
1051
+ end
1052
+
1053
+ #
1054
+ # Creates a container registry with the specified parameters.
1055
+ #
1056
+ # @param resource_group_name [String] The name of the resource group to which
1057
+ # the container registry belongs.
1058
+ # @param registry_name [String] The name of the container registry.
1059
+ # @param registry [Registry] The parameters for creating a container registry.
1060
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1061
+ # to the HTTP request.
1062
+ #
1063
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1064
+ #
1065
+ def begin_create_async(resource_group_name, registry_name, registry, custom_headers:nil)
1066
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1067
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1068
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1069
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1070
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
1071
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
1072
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
1073
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
1074
+ fail ArgumentError, 'registry is nil' if registry.nil?
1075
+
1076
+
1077
+ request_headers = {}
1078
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1079
+
1080
+ # Set Headers
1081
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1082
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1083
+
1084
+ # Serialize Request
1085
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper()
1086
+ request_content = @client.serialize(request_mapper, registry)
1087
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1088
+
1089
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'
1090
+
1091
+ request_url = @base_url || @client.base_url
1092
+
1093
+ options = {
1094
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1095
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
1096
+ query_params: {'api-version' => @client.api_version},
1097
+ body: request_content,
1098
+ headers: request_headers.merge(custom_headers || {}),
1099
+ base_url: request_url
1100
+ }
1101
+ promise = @client.make_request_async(:put, path_template, options)
1102
+
1103
+ promise = promise.then do |result|
1104
+ http_response = result.response
1105
+ status_code = http_response.status
1106
+ response_content = http_response.body
1107
+ unless status_code == 200 || status_code == 201
1108
+ error_model = JSON.load(response_content)
1109
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1110
+ end
1111
+
1112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1113
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1114
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1115
+ # Deserialize Response
1116
+ if status_code == 200
1117
+ begin
1118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1119
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper()
1120
+ result.body = @client.deserialize(result_mapper, parsed_response)
1121
+ rescue Exception => e
1122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1123
+ end
1124
+ end
1125
+ # Deserialize Response
1126
+ if status_code == 201
1127
+ begin
1128
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1129
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper()
1130
+ result.body = @client.deserialize(result_mapper, parsed_response)
1131
+ rescue Exception => e
1132
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1133
+ end
1134
+ end
1135
+
1136
+ result
1137
+ end
1138
+
1139
+ promise.execute
1140
+ end
1141
+
1142
+ #
1143
+ # Deletes a container registry.
1144
+ #
1145
+ # @param resource_group_name [String] The name of the resource group to which
1146
+ # the container registry belongs.
1147
+ # @param registry_name [String] The name of the container registry.
1148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1149
+ # will be added to the HTTP request.
1150
+ #
1151
+ #
1152
+ def begin_delete(resource_group_name, registry_name, custom_headers:nil)
1153
+ response = begin_delete_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
1154
+ nil
1155
+ end
1156
+
1157
+ #
1158
+ # Deletes a container registry.
1159
+ #
1160
+ # @param resource_group_name [String] The name of the resource group to which
1161
+ # the container registry belongs.
1162
+ # @param registry_name [String] The name of the container registry.
1163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1164
+ # will be added to the HTTP request.
1165
+ #
1166
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1167
+ #
1168
+ def begin_delete_with_http_info(resource_group_name, registry_name, custom_headers:nil)
1169
+ begin_delete_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
1170
+ end
1171
+
1172
+ #
1173
+ # Deletes a container registry.
1174
+ #
1175
+ # @param resource_group_name [String] The name of the resource group to which
1176
+ # the container registry belongs.
1177
+ # @param registry_name [String] The name of the container registry.
1178
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1179
+ # to the HTTP request.
1180
+ #
1181
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1182
+ #
1183
+ def begin_delete_async(resource_group_name, registry_name, custom_headers:nil)
1184
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1185
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1186
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1187
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1188
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
1189
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
1190
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
1191
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
1192
+
1193
+
1194
+ request_headers = {}
1195
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1196
+
1197
+ # Set Headers
1198
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1199
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1200
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'
1201
+
1202
+ request_url = @base_url || @client.base_url
1203
+
1204
+ options = {
1205
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1206
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
1207
+ query_params: {'api-version' => @client.api_version},
1208
+ headers: request_headers.merge(custom_headers || {}),
1209
+ base_url: request_url
1210
+ }
1211
+ promise = @client.make_request_async(:delete, path_template, options)
1212
+
1213
+ promise = promise.then do |result|
1214
+ http_response = result.response
1215
+ status_code = http_response.status
1216
+ response_content = http_response.body
1217
+ unless status_code == 200 || status_code == 202 || status_code == 204
1218
+ error_model = JSON.load(response_content)
1219
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1220
+ end
1221
+
1222
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1223
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1224
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1225
+
1226
+ result
1227
+ end
1228
+
1229
+ promise.execute
1230
+ end
1231
+
1232
+ #
1233
+ # Updates a container registry with the specified parameters.
1234
+ #
1235
+ # @param resource_group_name [String] The name of the resource group to which
1236
+ # the container registry belongs.
1237
+ # @param registry_name [String] The name of the container registry.
1238
+ # @param registry_update_parameters [RegistryUpdateParameters] The parameters
1239
+ # for updating a container registry.
1240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1241
+ # will be added to the HTTP request.
1242
+ #
1243
+ # @return [Registry] operation results.
1244
+ #
1245
+ def begin_update(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
1246
+ response = begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value!
1247
+ response.body unless response.nil?
1248
+ end
1249
+
1250
+ #
1251
+ # Updates a container registry with the specified parameters.
1252
+ #
1253
+ # @param resource_group_name [String] The name of the resource group to which
1254
+ # the container registry belongs.
1255
+ # @param registry_name [String] The name of the container registry.
1256
+ # @param registry_update_parameters [RegistryUpdateParameters] The parameters
1257
+ # for updating a container registry.
1258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1259
+ # will be added to the HTTP request.
1260
+ #
1261
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1262
+ #
1263
+ def begin_update_with_http_info(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
1264
+ begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value!
1265
+ end
1266
+
1267
+ #
1268
+ # Updates a container registry with the specified parameters.
1269
+ #
1270
+ # @param resource_group_name [String] The name of the resource group to which
1271
+ # the container registry belongs.
1272
+ # @param registry_name [String] The name of the container registry.
1273
+ # @param registry_update_parameters [RegistryUpdateParameters] The parameters
1274
+ # for updating a container registry.
1275
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1276
+ # to the HTTP request.
1277
+ #
1278
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1279
+ #
1280
+ def begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil)
1281
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1282
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1283
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1284
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1285
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
1286
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
1287
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
1288
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil?
1289
+ fail ArgumentError, 'registry_update_parameters is nil' if registry_update_parameters.nil?
1290
+
1291
+
1292
+ request_headers = {}
1293
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1294
+
1295
+ # Set Headers
1296
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1297
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1298
+
1299
+ # Serialize Request
1300
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryUpdateParameters.mapper()
1301
+ request_content = @client.serialize(request_mapper, registry_update_parameters)
1302
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1303
+
1304
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'
1305
+
1306
+ request_url = @base_url || @client.base_url
1307
+
1308
+ options = {
1309
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1310
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
1311
+ query_params: {'api-version' => @client.api_version},
1312
+ body: request_content,
1313
+ headers: request_headers.merge(custom_headers || {}),
1314
+ base_url: request_url
1315
+ }
1316
+ promise = @client.make_request_async(:patch, path_template, options)
1317
+
1318
+ promise = promise.then do |result|
1319
+ http_response = result.response
1320
+ status_code = http_response.status
1321
+ response_content = http_response.body
1322
+ unless status_code == 200 || status_code == 201
1323
+ error_model = JSON.load(response_content)
1324
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1325
+ end
1326
+
1327
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1328
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1329
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1330
+ # Deserialize Response
1331
+ if status_code == 200
1332
+ begin
1333
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1334
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper()
1335
+ result.body = @client.deserialize(result_mapper, parsed_response)
1336
+ rescue Exception => e
1337
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1338
+ end
1339
+ end
1340
+ # Deserialize Response
1341
+ if status_code == 201
1342
+ begin
1343
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1344
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper()
1345
+ result.body = @client.deserialize(result_mapper, parsed_response)
1346
+ rescue Exception => e
1347
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1348
+ end
1349
+ end
1350
+
1351
+ result
1352
+ end
1353
+
1354
+ promise.execute
1355
+ end
1356
+
1357
+ #
1358
+ # Lists all the container registries under the specified resource group.
1359
+ #
1360
+ # @param next_page_link [String] The NextLink from the previous successful call
1361
+ # to List operation.
1362
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1363
+ # will be added to the HTTP request.
1364
+ #
1365
+ # @return [RegistryListResult] operation results.
1366
+ #
1367
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1368
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1369
+ response.body unless response.nil?
1370
+ end
1371
+
1372
+ #
1373
+ # Lists all the container registries under the specified resource group.
1374
+ #
1375
+ # @param next_page_link [String] The NextLink from the previous successful call
1376
+ # to List operation.
1377
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1378
+ # will be added to the HTTP request.
1379
+ #
1380
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1381
+ #
1382
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1383
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1384
+ end
1385
+
1386
+ #
1387
+ # Lists all the container registries under the specified resource group.
1388
+ #
1389
+ # @param next_page_link [String] The NextLink from the previous successful call
1390
+ # to List operation.
1391
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1392
+ # to the HTTP request.
1393
+ #
1394
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1395
+ #
1396
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1397
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1398
+
1399
+
1400
+ request_headers = {}
1401
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1402
+
1403
+ # Set Headers
1404
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1405
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1406
+ path_template = '{nextLink}'
1407
+
1408
+ request_url = @base_url || @client.base_url
1409
+
1410
+ options = {
1411
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1412
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1413
+ headers: request_headers.merge(custom_headers || {}),
1414
+ base_url: request_url
1415
+ }
1416
+ promise = @client.make_request_async(:get, path_template, options)
1417
+
1418
+ promise = promise.then do |result|
1419
+ http_response = result.response
1420
+ status_code = http_response.status
1421
+ response_content = http_response.body
1422
+ unless status_code == 200
1423
+ error_model = JSON.load(response_content)
1424
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1425
+ end
1426
+
1427
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1428
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1429
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1430
+ # Deserialize Response
1431
+ if status_code == 200
1432
+ begin
1433
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1434
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListResult.mapper()
1435
+ result.body = @client.deserialize(result_mapper, parsed_response)
1436
+ rescue Exception => e
1437
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1438
+ end
1439
+ end
1440
+
1441
+ result
1442
+ end
1443
+
1444
+ promise.execute
1445
+ end
1446
+
1447
+ #
1448
+ # Lists all the container registries under the specified subscription.
1449
+ #
1450
+ # @param next_page_link [String] The NextLink from the previous successful call
1451
+ # to List operation.
1452
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1453
+ # will be added to the HTTP request.
1454
+ #
1455
+ # @return [RegistryListResult] operation results.
1456
+ #
1457
+ def list_next(next_page_link, custom_headers:nil)
1458
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1459
+ response.body unless response.nil?
1460
+ end
1461
+
1462
+ #
1463
+ # Lists all the container registries under the specified subscription.
1464
+ #
1465
+ # @param next_page_link [String] The NextLink from the previous successful call
1466
+ # to List operation.
1467
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1468
+ # will be added to the HTTP request.
1469
+ #
1470
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1471
+ #
1472
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1473
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1474
+ end
1475
+
1476
+ #
1477
+ # Lists all the container registries under the specified subscription.
1478
+ #
1479
+ # @param next_page_link [String] The NextLink from the previous successful call
1480
+ # to List operation.
1481
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1482
+ # to the HTTP request.
1483
+ #
1484
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1485
+ #
1486
+ def list_next_async(next_page_link, custom_headers:nil)
1487
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1488
+
1489
+
1490
+ request_headers = {}
1491
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1492
+
1493
+ # Set Headers
1494
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1495
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1496
+ path_template = '{nextLink}'
1497
+
1498
+ request_url = @base_url || @client.base_url
1499
+
1500
+ options = {
1501
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1502
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1503
+ headers: request_headers.merge(custom_headers || {}),
1504
+ base_url: request_url
1505
+ }
1506
+ promise = @client.make_request_async(:get, path_template, options)
1507
+
1508
+ promise = promise.then do |result|
1509
+ http_response = result.response
1510
+ status_code = http_response.status
1511
+ response_content = http_response.body
1512
+ unless status_code == 200
1513
+ error_model = JSON.load(response_content)
1514
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1515
+ end
1516
+
1517
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1518
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1519
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1520
+ # Deserialize Response
1521
+ if status_code == 200
1522
+ begin
1523
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1524
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListResult.mapper()
1525
+ result.body = @client.deserialize(result_mapper, parsed_response)
1526
+ rescue Exception => e
1527
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1528
+ end
1529
+ end
1530
+
1531
+ result
1532
+ end
1533
+
1534
+ promise.execute
1535
+ end
1536
+
1537
+ #
1538
+ # Lists all the container registries under the specified resource group.
1539
+ #
1540
+ # @param resource_group_name [String] The name of the resource group to which
1541
+ # the container registry belongs.
1542
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1543
+ # will be added to the HTTP request.
1544
+ #
1545
+ # @return [RegistryListResult] which provide lazy access to pages of the
1546
+ # response.
1547
+ #
1548
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1549
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1550
+ unless response.nil?
1551
+ page = response.body
1552
+ page.next_method = Proc.new do |next_page_link|
1553
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1554
+ end
1555
+ page
1556
+ end
1557
+ end
1558
+
1559
+ #
1560
+ # Lists all the container registries under the specified subscription.
1561
+ #
1562
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1563
+ # will be added to the HTTP request.
1564
+ #
1565
+ # @return [RegistryListResult] which provide lazy access to pages of the
1566
+ # response.
1567
+ #
1568
+ def list_as_lazy(custom_headers:nil)
1569
+ response = list_async(custom_headers:custom_headers).value!
1570
+ unless response.nil?
1571
+ page = response.body
1572
+ page.next_method = Proc.new do |next_page_link|
1573
+ list_next_async(next_page_link, custom_headers:custom_headers)
1574
+ end
1575
+ page
1576
+ end
1577
+ end
1578
+
1579
+ end
1580
+ end