azure_mgmt_container_registry 0.18.2 → 0.18.3

Sign up to get free protection for your applications and to get access to all the features.
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,9 @@
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 end
7
+ module Azure::ContainerRegistry end
8
+ module Azure::ContainerRegistry::Mgmt end
9
+ module Azure::ContainerRegistry::Mgmt::V2019_05_01_preview end
@@ -0,0 +1,188 @@
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_preview
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
+ # Generate keys for a token of a specified container registry.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group to which
28
+ # the container registry belongs.
29
+ # @param registry_name [String] The name of the container registry.
30
+ # @param generate_credentials_parameters [GenerateCredentialsParameters] The
31
+ # parameters for generating credentials.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [GenerateCredentialsResult] operation results.
36
+ #
37
+ def generate_credentials(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:nil)
38
+ response = generate_credentials_async(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # @param resource_group_name [String] The name of the resource group to which
44
+ # the container registry belongs.
45
+ # @param registry_name [String] The name of the container registry.
46
+ # @param generate_credentials_parameters [GenerateCredentialsParameters] The
47
+ # parameters for generating credentials.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [Concurrent::Promise] promise which provides async access to http
52
+ # response.
53
+ #
54
+ def generate_credentials_async(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:nil)
55
+ # Send request
56
+ promise = begin_generate_credentials_async(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:custom_headers)
57
+
58
+ promise = promise.then do |response|
59
+ # Defining deserialization method.
60
+ deserialize_method = lambda do |parsed_response|
61
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::GenerateCredentialsResult.mapper()
62
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
63
+ end
64
+
65
+ # Waiting for response.
66
+ @client.get_long_running_operation_result(response, deserialize_method)
67
+ end
68
+
69
+ promise
70
+ end
71
+
72
+ #
73
+ # Generate keys for a token of a specified container registry.
74
+ #
75
+ # @param resource_group_name [String] The name of the resource group to which
76
+ # the container registry belongs.
77
+ # @param registry_name [String] The name of the container registry.
78
+ # @param generate_credentials_parameters [GenerateCredentialsParameters] The
79
+ # parameters for generating credentials.
80
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
81
+ # will be added to the HTTP request.
82
+ #
83
+ # @return [GenerateCredentialsResult] operation results.
84
+ #
85
+ def begin_generate_credentials(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:nil)
86
+ response = begin_generate_credentials_async(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:custom_headers).value!
87
+ response.body unless response.nil?
88
+ end
89
+
90
+ #
91
+ # Generate keys for a token of a specified container registry.
92
+ #
93
+ # @param resource_group_name [String] The name of the resource group to which
94
+ # the container registry belongs.
95
+ # @param registry_name [String] The name of the container registry.
96
+ # @param generate_credentials_parameters [GenerateCredentialsParameters] The
97
+ # parameters for generating credentials.
98
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
99
+ # will be added to the HTTP request.
100
+ #
101
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
102
+ #
103
+ def begin_generate_credentials_with_http_info(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:nil)
104
+ begin_generate_credentials_async(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:custom_headers).value!
105
+ end
106
+
107
+ #
108
+ # Generate keys for a token of a specified container registry.
109
+ #
110
+ # @param resource_group_name [String] The name of the resource group to which
111
+ # the container registry belongs.
112
+ # @param registry_name [String] The name of the container registry.
113
+ # @param generate_credentials_parameters [GenerateCredentialsParameters] The
114
+ # parameters for generating credentials.
115
+ # @param [Hash{String => String}] A hash of custom headers that will be added
116
+ # to the HTTP request.
117
+ #
118
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
119
+ #
120
+ def begin_generate_credentials_async(resource_group_name, registry_name, generate_credentials_parameters, custom_headers:nil)
121
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
122
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
123
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
124
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
125
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
126
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
127
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
128
+ 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?
129
+ fail ArgumentError, 'generate_credentials_parameters is nil' if generate_credentials_parameters.nil?
130
+
131
+
132
+ request_headers = {}
133
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
134
+
135
+ # Set Headers
136
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
137
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
138
+
139
+ # Serialize Request
140
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::GenerateCredentialsParameters.mapper()
141
+ request_content = @client.serialize(request_mapper, generate_credentials_parameters)
142
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
143
+
144
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials'
145
+
146
+ request_url = @base_url || @client.base_url
147
+
148
+ options = {
149
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
150
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
151
+ query_params: {'api-version' => @client.api_version},
152
+ body: request_content,
153
+ headers: request_headers.merge(custom_headers || {}),
154
+ base_url: request_url
155
+ }
156
+ promise = @client.make_request_async(:post, path_template, options)
157
+
158
+ promise = promise.then do |result|
159
+ http_response = result.response
160
+ status_code = http_response.status
161
+ response_content = http_response.body
162
+ unless status_code == 200 || status_code == 202
163
+ error_model = JSON.load(response_content)
164
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
165
+ end
166
+
167
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
168
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
169
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
170
+ # Deserialize Response
171
+ if status_code == 200
172
+ begin
173
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
174
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::GenerateCredentialsResult.mapper()
175
+ result.body = @client.deserialize(result_mapper, parsed_response)
176
+ rescue Exception => e
177
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
178
+ end
179
+ end
180
+
181
+ result
182
+ end
183
+
184
+ promise.execute
185
+ end
186
+
187
+ end
188
+ end
@@ -0,0 +1,850 @@
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_preview
7
+ #
8
+ # ScopeMaps
9
+ #
10
+ class ScopeMaps
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ScopeMaps 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
+ # Gets the properties of the specified scope map.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group to which
28
+ # the container registry belongs.
29
+ # @param registry_name [String] The name of the container registry.
30
+ # @param scope_map_name [String] The name of the scope map.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [ScopeMap] operation results.
35
+ #
36
+ def get(resource_group_name, registry_name, scope_map_name, custom_headers:nil)
37
+ response = get_async(resource_group_name, registry_name, scope_map_name, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Gets the properties of the specified scope map.
43
+ #
44
+ # @param resource_group_name [String] The name of the resource group to which
45
+ # the container registry belongs.
46
+ # @param registry_name [String] The name of the container registry.
47
+ # @param scope_map_name [String] The name of the scope map.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def get_with_http_info(resource_group_name, registry_name, scope_map_name, custom_headers:nil)
54
+ get_async(resource_group_name, registry_name, scope_map_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Gets the properties of the specified scope map.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group to which
61
+ # the container registry belongs.
62
+ # @param registry_name [String] The name of the container registry.
63
+ # @param scope_map_name [String] The name of the scope map.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def get_async(resource_group_name, registry_name, scope_map_name, custom_headers:nil)
70
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
72
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
73
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
74
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
75
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
76
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
77
+ 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?
78
+ fail ArgumentError, 'scope_map_name is nil' if scope_map_name.nil?
79
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'MaxLength': '50'" if !scope_map_name.nil? && scope_map_name.length > 50
80
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'MinLength': '5'" if !scope_map_name.nil? && scope_map_name.length < 5
81
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]*$'" if !scope_map_name.nil? && scope_map_name.match(Regexp.new('^^[a-zA-Z0-9-]*$$')).nil?
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'
91
+
92
+ request_url = @base_url || @client.base_url
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'scopeMapName' => scope_map_name},
97
+ query_params: {'api-version' => @client.api_version},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:get, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 200
108
+ error_model = JSON.load(response_content)
109
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
114
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 200
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMap.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response)
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ #
133
+ # Creates a scope map for a container registry with the specified parameters.
134
+ #
135
+ # @param resource_group_name [String] The name of the resource group to which
136
+ # the container registry belongs.
137
+ # @param registry_name [String] The name of the container registry.
138
+ # @param scope_map_name [String] The name of the scope map.
139
+ # @param scope_map_create_parameters [ScopeMap] The parameters for creating a
140
+ # scope map.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [ScopeMap] operation results.
145
+ #
146
+ def create(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:nil)
147
+ response = create_async(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:custom_headers).value!
148
+ response.body unless response.nil?
149
+ end
150
+
151
+ #
152
+ # @param resource_group_name [String] The name of the resource group to which
153
+ # the container registry belongs.
154
+ # @param registry_name [String] The name of the container registry.
155
+ # @param scope_map_name [String] The name of the scope map.
156
+ # @param scope_map_create_parameters [ScopeMap] The parameters for creating a
157
+ # scope map.
158
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
159
+ # will be added to the HTTP request.
160
+ #
161
+ # @return [Concurrent::Promise] promise which provides async access to http
162
+ # response.
163
+ #
164
+ def create_async(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:nil)
165
+ # Send request
166
+ promise = begin_create_async(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:custom_headers)
167
+
168
+ promise = promise.then do |response|
169
+ # Defining deserialization method.
170
+ deserialize_method = lambda do |parsed_response|
171
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMap.mapper()
172
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
173
+ end
174
+
175
+ # Waiting for response.
176
+ @client.get_long_running_operation_result(response, deserialize_method)
177
+ end
178
+
179
+ promise
180
+ end
181
+
182
+ #
183
+ # Deletes a scope map from a container registry.
184
+ #
185
+ # @param resource_group_name [String] The name of the resource group to which
186
+ # the container registry belongs.
187
+ # @param registry_name [String] The name of the container registry.
188
+ # @param scope_map_name [String] The name of the scope map.
189
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
190
+ # will be added to the HTTP request.
191
+ #
192
+ def delete(resource_group_name, registry_name, scope_map_name, custom_headers:nil)
193
+ response = delete_async(resource_group_name, registry_name, scope_map_name, custom_headers:custom_headers).value!
194
+ nil
195
+ end
196
+
197
+ #
198
+ # @param resource_group_name [String] The name of the resource group to which
199
+ # the container registry belongs.
200
+ # @param registry_name [String] The name of the container registry.
201
+ # @param scope_map_name [String] The name of the scope map.
202
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
203
+ # will be added to the HTTP request.
204
+ #
205
+ # @return [Concurrent::Promise] promise which provides async access to http
206
+ # response.
207
+ #
208
+ def delete_async(resource_group_name, registry_name, scope_map_name, custom_headers:nil)
209
+ # Send request
210
+ promise = begin_delete_async(resource_group_name, registry_name, scope_map_name, custom_headers:custom_headers)
211
+
212
+ promise = promise.then do |response|
213
+ # Defining deserialization method.
214
+ deserialize_method = lambda do |parsed_response|
215
+ end
216
+
217
+ # Waiting for response.
218
+ @client.get_long_running_operation_result(response, deserialize_method)
219
+ end
220
+
221
+ promise
222
+ end
223
+
224
+ #
225
+ # Updates a scope map with the specified parameters.
226
+ #
227
+ # @param resource_group_name [String] The name of the resource group to which
228
+ # the container registry belongs.
229
+ # @param registry_name [String] The name of the container registry.
230
+ # @param scope_map_name [String] The name of the scope map.
231
+ # @param scope_map_update_parameters [ScopeMapUpdateParameters] The parameters
232
+ # for updating a scope map.
233
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
234
+ # will be added to the HTTP request.
235
+ #
236
+ # @return [ScopeMap] operation results.
237
+ #
238
+ def update(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:nil)
239
+ response = update_async(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:custom_headers).value!
240
+ response.body unless response.nil?
241
+ end
242
+
243
+ #
244
+ # @param resource_group_name [String] The name of the resource group to which
245
+ # the container registry belongs.
246
+ # @param registry_name [String] The name of the container registry.
247
+ # @param scope_map_name [String] The name of the scope map.
248
+ # @param scope_map_update_parameters [ScopeMapUpdateParameters] The parameters
249
+ # for updating a scope map.
250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
+ # will be added to the HTTP request.
252
+ #
253
+ # @return [Concurrent::Promise] promise which provides async access to http
254
+ # response.
255
+ #
256
+ def update_async(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:nil)
257
+ # Send request
258
+ promise = begin_update_async(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:custom_headers)
259
+
260
+ promise = promise.then do |response|
261
+ # Defining deserialization method.
262
+ deserialize_method = lambda do |parsed_response|
263
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMap.mapper()
264
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
265
+ end
266
+
267
+ # Waiting for response.
268
+ @client.get_long_running_operation_result(response, deserialize_method)
269
+ end
270
+
271
+ promise
272
+ end
273
+
274
+ #
275
+ # Lists all the scope maps for the specified container registry.
276
+ #
277
+ # @param resource_group_name [String] The name of the resource group to which
278
+ # the container registry belongs.
279
+ # @param registry_name [String] The name of the container registry.
280
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
281
+ # will be added to the HTTP request.
282
+ #
283
+ # @return [Array<ScopeMap>] operation results.
284
+ #
285
+ def list(resource_group_name, registry_name, custom_headers:nil)
286
+ first_page = list_as_lazy(resource_group_name, registry_name, custom_headers:custom_headers)
287
+ first_page.get_all_items
288
+ end
289
+
290
+ #
291
+ # Lists all the scope maps for the specified container registry.
292
+ #
293
+ # @param resource_group_name [String] The name of the resource group to which
294
+ # the container registry belongs.
295
+ # @param registry_name [String] The name of the container registry.
296
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
297
+ # will be added to the HTTP request.
298
+ #
299
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
300
+ #
301
+ def list_with_http_info(resource_group_name, registry_name, custom_headers:nil)
302
+ list_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
303
+ end
304
+
305
+ #
306
+ # Lists all the scope maps for the specified container registry.
307
+ #
308
+ # @param resource_group_name [String] The name of the resource group to which
309
+ # the container registry belongs.
310
+ # @param registry_name [String] The name of the container registry.
311
+ # @param [Hash{String => String}] A hash of custom headers that will be added
312
+ # to the HTTP request.
313
+ #
314
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
315
+ #
316
+ def list_async(resource_group_name, registry_name, custom_headers:nil)
317
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
318
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
319
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
320
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
321
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
322
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
323
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
324
+ 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?
325
+
326
+
327
+ request_headers = {}
328
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
329
+
330
+ # Set Headers
331
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
332
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
333
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps'
334
+
335
+ request_url = @base_url || @client.base_url
336
+
337
+ options = {
338
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
339
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name},
340
+ query_params: {'api-version' => @client.api_version},
341
+ headers: request_headers.merge(custom_headers || {}),
342
+ base_url: request_url
343
+ }
344
+ promise = @client.make_request_async(:get, path_template, options)
345
+
346
+ promise = promise.then do |result|
347
+ http_response = result.response
348
+ status_code = http_response.status
349
+ response_content = http_response.body
350
+ unless status_code == 200
351
+ error_model = JSON.load(response_content)
352
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
353
+ end
354
+
355
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
356
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
357
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
358
+ # Deserialize Response
359
+ if status_code == 200
360
+ begin
361
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
362
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMapListResult.mapper()
363
+ result.body = @client.deserialize(result_mapper, parsed_response)
364
+ rescue Exception => e
365
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
366
+ end
367
+ end
368
+
369
+ result
370
+ end
371
+
372
+ promise.execute
373
+ end
374
+
375
+ #
376
+ # Creates a scope map for a container registry with the specified parameters.
377
+ #
378
+ # @param resource_group_name [String] The name of the resource group to which
379
+ # the container registry belongs.
380
+ # @param registry_name [String] The name of the container registry.
381
+ # @param scope_map_name [String] The name of the scope map.
382
+ # @param scope_map_create_parameters [ScopeMap] The parameters for creating a
383
+ # scope map.
384
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
385
+ # will be added to the HTTP request.
386
+ #
387
+ # @return [ScopeMap] operation results.
388
+ #
389
+ def begin_create(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:nil)
390
+ response = begin_create_async(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:custom_headers).value!
391
+ response.body unless response.nil?
392
+ end
393
+
394
+ #
395
+ # Creates a scope map for a container registry with the specified parameters.
396
+ #
397
+ # @param resource_group_name [String] The name of the resource group to which
398
+ # the container registry belongs.
399
+ # @param registry_name [String] The name of the container registry.
400
+ # @param scope_map_name [String] The name of the scope map.
401
+ # @param scope_map_create_parameters [ScopeMap] The parameters for creating a
402
+ # scope map.
403
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
404
+ # will be added to the HTTP request.
405
+ #
406
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
407
+ #
408
+ def begin_create_with_http_info(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:nil)
409
+ begin_create_async(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:custom_headers).value!
410
+ end
411
+
412
+ #
413
+ # Creates a scope map for a container registry with the specified parameters.
414
+ #
415
+ # @param resource_group_name [String] The name of the resource group to which
416
+ # the container registry belongs.
417
+ # @param registry_name [String] The name of the container registry.
418
+ # @param scope_map_name [String] The name of the scope map.
419
+ # @param scope_map_create_parameters [ScopeMap] The parameters for creating a
420
+ # scope map.
421
+ # @param [Hash{String => String}] A hash of custom headers that will be added
422
+ # to the HTTP request.
423
+ #
424
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
425
+ #
426
+ def begin_create_async(resource_group_name, registry_name, scope_map_name, scope_map_create_parameters, custom_headers:nil)
427
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
428
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
429
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
430
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
431
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
432
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
433
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
434
+ 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?
435
+ fail ArgumentError, 'scope_map_name is nil' if scope_map_name.nil?
436
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'MaxLength': '50'" if !scope_map_name.nil? && scope_map_name.length > 50
437
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'MinLength': '5'" if !scope_map_name.nil? && scope_map_name.length < 5
438
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]*$'" if !scope_map_name.nil? && scope_map_name.match(Regexp.new('^^[a-zA-Z0-9-]*$$')).nil?
439
+ fail ArgumentError, 'scope_map_create_parameters is nil' if scope_map_create_parameters.nil?
440
+
441
+
442
+ request_headers = {}
443
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
444
+
445
+ # Set Headers
446
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
447
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
448
+
449
+ # Serialize Request
450
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMap.mapper()
451
+ request_content = @client.serialize(request_mapper, scope_map_create_parameters)
452
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
453
+
454
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'
455
+
456
+ request_url = @base_url || @client.base_url
457
+
458
+ options = {
459
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
460
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'scopeMapName' => scope_map_name},
461
+ query_params: {'api-version' => @client.api_version},
462
+ body: request_content,
463
+ headers: request_headers.merge(custom_headers || {}),
464
+ base_url: request_url
465
+ }
466
+ promise = @client.make_request_async(:put, path_template, options)
467
+
468
+ promise = promise.then do |result|
469
+ http_response = result.response
470
+ status_code = http_response.status
471
+ response_content = http_response.body
472
+ unless status_code == 200 || status_code == 201
473
+ error_model = JSON.load(response_content)
474
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
475
+ end
476
+
477
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
478
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
479
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
480
+ # Deserialize Response
481
+ if status_code == 200
482
+ begin
483
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
484
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMap.mapper()
485
+ result.body = @client.deserialize(result_mapper, parsed_response)
486
+ rescue Exception => e
487
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
488
+ end
489
+ end
490
+ # Deserialize Response
491
+ if status_code == 201
492
+ begin
493
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
494
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMap.mapper()
495
+ result.body = @client.deserialize(result_mapper, parsed_response)
496
+ rescue Exception => e
497
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
498
+ end
499
+ end
500
+
501
+ result
502
+ end
503
+
504
+ promise.execute
505
+ end
506
+
507
+ #
508
+ # Deletes a scope map from a container registry.
509
+ #
510
+ # @param resource_group_name [String] The name of the resource group to which
511
+ # the container registry belongs.
512
+ # @param registry_name [String] The name of the container registry.
513
+ # @param scope_map_name [String] The name of the scope map.
514
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
515
+ # will be added to the HTTP request.
516
+ #
517
+ #
518
+ def begin_delete(resource_group_name, registry_name, scope_map_name, custom_headers:nil)
519
+ response = begin_delete_async(resource_group_name, registry_name, scope_map_name, custom_headers:custom_headers).value!
520
+ nil
521
+ end
522
+
523
+ #
524
+ # Deletes a scope map from a container registry.
525
+ #
526
+ # @param resource_group_name [String] The name of the resource group to which
527
+ # the container registry belongs.
528
+ # @param registry_name [String] The name of the container registry.
529
+ # @param scope_map_name [String] The name of the scope map.
530
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
531
+ # will be added to the HTTP request.
532
+ #
533
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
534
+ #
535
+ def begin_delete_with_http_info(resource_group_name, registry_name, scope_map_name, custom_headers:nil)
536
+ begin_delete_async(resource_group_name, registry_name, scope_map_name, custom_headers:custom_headers).value!
537
+ end
538
+
539
+ #
540
+ # Deletes a scope map from a container registry.
541
+ #
542
+ # @param resource_group_name [String] The name of the resource group to which
543
+ # the container registry belongs.
544
+ # @param registry_name [String] The name of the container registry.
545
+ # @param scope_map_name [String] The name of the scope map.
546
+ # @param [Hash{String => String}] A hash of custom headers that will be added
547
+ # to the HTTP request.
548
+ #
549
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
550
+ #
551
+ def begin_delete_async(resource_group_name, registry_name, scope_map_name, custom_headers:nil)
552
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
553
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
554
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
555
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
556
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
557
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
558
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
559
+ 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?
560
+ fail ArgumentError, 'scope_map_name is nil' if scope_map_name.nil?
561
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'MaxLength': '50'" if !scope_map_name.nil? && scope_map_name.length > 50
562
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'MinLength': '5'" if !scope_map_name.nil? && scope_map_name.length < 5
563
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]*$'" if !scope_map_name.nil? && scope_map_name.match(Regexp.new('^^[a-zA-Z0-9-]*$$')).nil?
564
+
565
+
566
+ request_headers = {}
567
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
568
+
569
+ # Set Headers
570
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
571
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
572
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'
573
+
574
+ request_url = @base_url || @client.base_url
575
+
576
+ options = {
577
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
578
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'scopeMapName' => scope_map_name},
579
+ query_params: {'api-version' => @client.api_version},
580
+ headers: request_headers.merge(custom_headers || {}),
581
+ base_url: request_url
582
+ }
583
+ promise = @client.make_request_async(:delete, path_template, options)
584
+
585
+ promise = promise.then do |result|
586
+ http_response = result.response
587
+ status_code = http_response.status
588
+ response_content = http_response.body
589
+ unless status_code == 200 || status_code == 202 || status_code == 204
590
+ error_model = JSON.load(response_content)
591
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
592
+ end
593
+
594
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
595
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
596
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
597
+
598
+ result
599
+ end
600
+
601
+ promise.execute
602
+ end
603
+
604
+ #
605
+ # Updates a scope map with the specified parameters.
606
+ #
607
+ # @param resource_group_name [String] The name of the resource group to which
608
+ # the container registry belongs.
609
+ # @param registry_name [String] The name of the container registry.
610
+ # @param scope_map_name [String] The name of the scope map.
611
+ # @param scope_map_update_parameters [ScopeMapUpdateParameters] The parameters
612
+ # for updating a scope map.
613
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
614
+ # will be added to the HTTP request.
615
+ #
616
+ # @return [ScopeMap] operation results.
617
+ #
618
+ def begin_update(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:nil)
619
+ response = begin_update_async(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:custom_headers).value!
620
+ response.body unless response.nil?
621
+ end
622
+
623
+ #
624
+ # Updates a scope map with the specified parameters.
625
+ #
626
+ # @param resource_group_name [String] The name of the resource group to which
627
+ # the container registry belongs.
628
+ # @param registry_name [String] The name of the container registry.
629
+ # @param scope_map_name [String] The name of the scope map.
630
+ # @param scope_map_update_parameters [ScopeMapUpdateParameters] The parameters
631
+ # for updating a scope map.
632
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
633
+ # will be added to the HTTP request.
634
+ #
635
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
636
+ #
637
+ def begin_update_with_http_info(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:nil)
638
+ begin_update_async(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:custom_headers).value!
639
+ end
640
+
641
+ #
642
+ # Updates a scope map with the specified parameters.
643
+ #
644
+ # @param resource_group_name [String] The name of the resource group to which
645
+ # the container registry belongs.
646
+ # @param registry_name [String] The name of the container registry.
647
+ # @param scope_map_name [String] The name of the scope map.
648
+ # @param scope_map_update_parameters [ScopeMapUpdateParameters] The parameters
649
+ # for updating a scope map.
650
+ # @param [Hash{String => String}] A hash of custom headers that will be added
651
+ # to the HTTP request.
652
+ #
653
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
654
+ #
655
+ def begin_update_async(resource_group_name, registry_name, scope_map_name, scope_map_update_parameters, custom_headers:nil)
656
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
657
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
658
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
659
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
660
+ fail ArgumentError, 'registry_name is nil' if registry_name.nil?
661
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50
662
+ fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5
663
+ 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?
664
+ fail ArgumentError, 'scope_map_name is nil' if scope_map_name.nil?
665
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'MaxLength': '50'" if !scope_map_name.nil? && scope_map_name.length > 50
666
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'MinLength': '5'" if !scope_map_name.nil? && scope_map_name.length < 5
667
+ fail ArgumentError, "'scope_map_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]*$'" if !scope_map_name.nil? && scope_map_name.match(Regexp.new('^^[a-zA-Z0-9-]*$$')).nil?
668
+ fail ArgumentError, 'scope_map_update_parameters is nil' if scope_map_update_parameters.nil?
669
+
670
+
671
+ request_headers = {}
672
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
673
+
674
+ # Set Headers
675
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
676
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
677
+
678
+ # Serialize Request
679
+ request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMapUpdateParameters.mapper()
680
+ request_content = @client.serialize(request_mapper, scope_map_update_parameters)
681
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
682
+
683
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'
684
+
685
+ request_url = @base_url || @client.base_url
686
+
687
+ options = {
688
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
689
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name,'scopeMapName' => scope_map_name},
690
+ query_params: {'api-version' => @client.api_version},
691
+ body: request_content,
692
+ headers: request_headers.merge(custom_headers || {}),
693
+ base_url: request_url
694
+ }
695
+ promise = @client.make_request_async(:patch, path_template, options)
696
+
697
+ promise = promise.then do |result|
698
+ http_response = result.response
699
+ status_code = http_response.status
700
+ response_content = http_response.body
701
+ unless status_code == 200 || status_code == 201
702
+ error_model = JSON.load(response_content)
703
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
704
+ end
705
+
706
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
707
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
708
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
709
+ # Deserialize Response
710
+ if status_code == 200
711
+ begin
712
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
713
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMap.mapper()
714
+ result.body = @client.deserialize(result_mapper, parsed_response)
715
+ rescue Exception => e
716
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
717
+ end
718
+ end
719
+ # Deserialize Response
720
+ if status_code == 201
721
+ begin
722
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
723
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMap.mapper()
724
+ result.body = @client.deserialize(result_mapper, parsed_response)
725
+ rescue Exception => e
726
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
727
+ end
728
+ end
729
+
730
+ result
731
+ end
732
+
733
+ promise.execute
734
+ end
735
+
736
+ #
737
+ # Lists all the scope maps for the specified container registry.
738
+ #
739
+ # @param next_page_link [String] The NextLink from the previous successful call
740
+ # to List operation.
741
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
742
+ # will be added to the HTTP request.
743
+ #
744
+ # @return [ScopeMapListResult] operation results.
745
+ #
746
+ def list_next(next_page_link, custom_headers:nil)
747
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
748
+ response.body unless response.nil?
749
+ end
750
+
751
+ #
752
+ # Lists all the scope maps for the specified container registry.
753
+ #
754
+ # @param next_page_link [String] The NextLink from the previous successful call
755
+ # to List operation.
756
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
757
+ # will be added to the HTTP request.
758
+ #
759
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
760
+ #
761
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
762
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
763
+ end
764
+
765
+ #
766
+ # Lists all the scope maps for the specified container registry.
767
+ #
768
+ # @param next_page_link [String] The NextLink from the previous successful call
769
+ # to List operation.
770
+ # @param [Hash{String => String}] A hash of custom headers that will be added
771
+ # to the HTTP request.
772
+ #
773
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
774
+ #
775
+ def list_next_async(next_page_link, custom_headers:nil)
776
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
777
+
778
+
779
+ request_headers = {}
780
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
781
+
782
+ # Set Headers
783
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
784
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
785
+ path_template = '{nextLink}'
786
+
787
+ request_url = @base_url || @client.base_url
788
+
789
+ options = {
790
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
791
+ skip_encoding_path_params: {'nextLink' => next_page_link},
792
+ headers: request_headers.merge(custom_headers || {}),
793
+ base_url: request_url
794
+ }
795
+ promise = @client.make_request_async(:get, path_template, options)
796
+
797
+ promise = promise.then do |result|
798
+ http_response = result.response
799
+ status_code = http_response.status
800
+ response_content = http_response.body
801
+ unless status_code == 200
802
+ error_model = JSON.load(response_content)
803
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
804
+ end
805
+
806
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
807
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
808
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
809
+ # Deserialize Response
810
+ if status_code == 200
811
+ begin
812
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
813
+ result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01_preview::Models::ScopeMapListResult.mapper()
814
+ result.body = @client.deserialize(result_mapper, parsed_response)
815
+ rescue Exception => e
816
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
817
+ end
818
+ end
819
+
820
+ result
821
+ end
822
+
823
+ promise.execute
824
+ end
825
+
826
+ #
827
+ # Lists all the scope maps for the specified container registry.
828
+ #
829
+ # @param resource_group_name [String] The name of the resource group to which
830
+ # the container registry belongs.
831
+ # @param registry_name [String] The name of the container registry.
832
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
833
+ # will be added to the HTTP request.
834
+ #
835
+ # @return [ScopeMapListResult] which provide lazy access to pages of the
836
+ # response.
837
+ #
838
+ def list_as_lazy(resource_group_name, registry_name, custom_headers:nil)
839
+ response = list_async(resource_group_name, registry_name, custom_headers:custom_headers).value!
840
+ unless response.nil?
841
+ page = response.body
842
+ page.next_method = Proc.new do |next_page_link|
843
+ list_next_async(next_page_link, custom_headers:custom_headers)
844
+ end
845
+ page
846
+ end
847
+ end
848
+
849
+ end
850
+ end