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