azure_mgmt_api_management 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (578) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2016-07-07/generated/azure_mgmt_api_management.rb +167 -0
  4. data/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb +252 -0
  5. data/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_services.rb +1855 -0
  6. data/lib/2016-07-07/generated/azure_mgmt_api_management/api_operations.rb +751 -0
  7. data/lib/2016-07-07/generated/azure_mgmt_api_management/api_products.rb +272 -0
  8. data/lib/2016-07-07/generated/azure_mgmt_api_management/apis.rb +820 -0
  9. data/lib/2016-07-07/generated/azure_mgmt_api_management/authorization_servers.rb +692 -0
  10. data/lib/2016-07-07/generated/azure_mgmt_api_management/backends.rb +699 -0
  11. data/lib/2016-07-07/generated/azure_mgmt_api_management/certificates.rb +600 -0
  12. data/lib/2016-07-07/generated/azure_mgmt_api_management/group_users.rb +549 -0
  13. data/lib/2016-07-07/generated/azure_mgmt_api_management/groups.rb +736 -0
  14. data/lib/2016-07-07/generated/azure_mgmt_api_management/identity_providers.rb +557 -0
  15. data/lib/2016-07-07/generated/azure_mgmt_api_management/loggers.rb +677 -0
  16. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_contract.rb +80 -0
  17. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb +48 -0
  18. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/additional_region.rb +112 -0
  19. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_collection.rb +109 -0
  20. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_contract.rb +168 -0
  21. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_export_result.rb +70 -0
  22. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb +84 -0
  23. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_base_parameters.rb +313 -0
  24. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb +47 -0
  25. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb +46 -0
  26. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb +100 -0
  27. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb +128 -0
  28. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb +79 -0
  29. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_resource.rb +294 -0
  30. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb +61 -0
  31. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb +76 -0
  32. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb +72 -0
  33. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_protocol_contract.rb +16 -0
  34. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/api_type_contract.rb +16 -0
  35. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/async_operation_state.rb +18 -0
  36. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb +47 -0
  37. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/authorization_server_collection.rb +109 -0
  38. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_collection.rb +109 -0
  39. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_contract.rb +66 -0
  40. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_response.rb +73 -0
  41. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/backend_update_parameters.rb +66 -0
  42. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/bearer_token_sending_methods_contract.rb +16 -0
  43. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_collection.rb +109 -0
  44. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_contract.rb +84 -0
  45. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb +58 -0
  46. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/certificate_information.rb +70 -0
  47. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/client_authentication_method_contract.rb +16 -0
  48. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb +59 -0
  49. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_body_contract.rb +79 -0
  50. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_field_contract.rb +68 -0
  51. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/error_response.rb +57 -0
  52. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb +46 -0
  53. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/grant_types_contract.rb +18 -0
  54. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_collection.rb +109 -0
  55. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_contract.rb +119 -0
  56. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_create_parameters.rb +85 -0
  57. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_type_contract.rb +17 -0
  58. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/group_update_parameters.rb +85 -0
  59. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/hostname_configuration.rb +71 -0
  60. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/hostname_type.rb +18 -0
  61. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/http_status_code.rb +20 -0
  62. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_contract.rb +106 -0
  63. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_list.rb +56 -0
  64. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_name_type.rb +19 -0
  65. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb +91 -0
  66. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_collection.rb +109 -0
  67. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_create_parameters.rb +91 -0
  68. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_response.rb +111 -0
  69. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/logger_update_parameters.rb +90 -0
  70. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/method_contract.rb +22 -0
  71. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/name_availability_reason.rb +17 -0
  72. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb +57 -0
  73. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb +300 -0
  74. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb +285 -0
  75. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb +109 -0
  76. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb +106 -0
  77. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb +95 -0
  78. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb +95 -0
  79. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_collection.rb +109 -0
  80. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_contract.rb +162 -0
  81. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_result_contract.rb +110 -0
  82. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/operation_status.rb +17 -0
  83. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/parameter_contract.rb +109 -0
  84. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/patch_parameters.rb +46 -0
  85. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/policy_scope_contract.rb +19 -0
  86. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb +85 -0
  87. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_collection.rb +109 -0
  88. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_contract.rb +159 -0
  89. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_state_contract.rb +16 -0
  90. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/product_update_parameters.rb +139 -0
  91. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_collection.rb +109 -0
  92. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_contract.rb +118 -0
  93. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_create_parameters.rb +103 -0
  94. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/property_update_parameters.rb +103 -0
  95. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_collection.rb +77 -0
  96. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_contract.rb +108 -0
  97. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb +57 -0
  98. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_contract.rb +57 -0
  99. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/region_list_result.rb +55 -0
  100. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_collection.rb +109 -0
  101. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/report_record_contract.rb +331 -0
  102. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/reports_aggregation.rb +21 -0
  103. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/representation_contract.rb +58 -0
  104. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/request_contract.rb +109 -0
  105. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/result_contract.rb +82 -0
  106. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb +60 -0
  107. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/sku_type.rb +17 -0
  108. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_collection.rb +109 -0
  109. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_contract.rb +226 -0
  110. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb +128 -0
  111. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb +57 -0
  112. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_state_contract.rb +20 -0
  113. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb +142 -0
  114. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb +121 -0
  115. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/tenant_long_running_operation_result.rb +94 -0
  116. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb +57 -0
  117. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_collection.rb +109 -0
  118. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_contract.rb +138 -0
  119. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_create_parameters.rb +120 -0
  120. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_identity_contract.rb +57 -0
  121. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_state_contract.rb +16 -0
  122. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/user_update_parameters.rb +111 -0
  123. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb +85 -0
  124. data/lib/2016-07-07/generated/azure_mgmt_api_management/models/virtual_network_type.rb +17 -0
  125. data/lib/2016-07-07/generated/azure_mgmt_api_management/module_definition.rb +9 -0
  126. data/lib/2016-07-07/generated/azure_mgmt_api_management/open_id_connect_providers.rb +691 -0
  127. data/lib/2016-07-07/generated/azure_mgmt_api_management/policy_snippets.rb +142 -0
  128. data/lib/2016-07-07/generated/azure_mgmt_api_management/product_apis.rb +515 -0
  129. data/lib/2016-07-07/generated/azure_mgmt_api_management/product_groups.rb +524 -0
  130. data/lib/2016-07-07/generated/azure_mgmt_api_management/product_subscriptions.rb +312 -0
  131. data/lib/2016-07-07/generated/azure_mgmt_api_management/products.rb +737 -0
  132. data/lib/2016-07-07/generated/azure_mgmt_api_management/property.rb +688 -0
  133. data/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_counter_keys.rb +238 -0
  134. data/lib/2016-07-07/generated/azure_mgmt_api_management/quota_by_period_keys.rb +237 -0
  135. data/lib/2016-07-07/generated/azure_mgmt_api_management/regions.rb +120 -0
  136. data/lib/2016-07-07/generated/azure_mgmt_api_management/reports.rb +281 -0
  137. data/lib/2016-07-07/generated/azure_mgmt_api_management/subscriptions.rb +895 -0
  138. data/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access.rb +394 -0
  139. data/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_access_git.rb +288 -0
  140. data/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration.rb +505 -0
  141. data/lib/2016-07-07/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb +123 -0
  142. data/lib/2016-07-07/generated/azure_mgmt_api_management/user_groups.rb +287 -0
  143. data/lib/2016-07-07/generated/azure_mgmt_api_management/user_identities.rb +146 -0
  144. data/lib/2016-07-07/generated/azure_mgmt_api_management/user_subscriptions.rb +312 -0
  145. data/lib/2016-07-07/generated/azure_mgmt_api_management/users.rb +874 -0
  146. data/lib/2016-10-10/generated/azure_mgmt_api_management.rb +193 -0
  147. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_export.rb +130 -0
  148. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb +284 -0
  149. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_operations.rb +222 -0
  150. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_services.rb +1995 -0
  151. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations.rb +751 -0
  152. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_operations_policy.rb +394 -0
  153. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_policy.rb +364 -0
  154. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_products.rb +272 -0
  155. data/lib/2016-10-10/generated/azure_mgmt_api_management/apis.rb +715 -0
  156. data/lib/2016-10-10/generated/azure_mgmt_api_management/authorization_servers.rb +696 -0
  157. data/lib/2016-10-10/generated/azure_mgmt_api_management/backends.rb +699 -0
  158. data/lib/2016-10-10/generated/azure_mgmt_api_management/certificates.rb +612 -0
  159. data/lib/2016-10-10/generated/azure_mgmt_api_management/group_users.rb +549 -0
  160. data/lib/2016-10-10/generated/azure_mgmt_api_management/groups.rb +736 -0
  161. data/lib/2016-10-10/generated/azure_mgmt_api_management/identity_providers.rb +557 -0
  162. data/lib/2016-10-10/generated/azure_mgmt_api_management/loggers.rb +695 -0
  163. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_contract.rb +80 -0
  164. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb +48 -0
  165. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/additional_region.rb +112 -0
  166. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_collection.rb +109 -0
  167. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_contract.rb +152 -0
  168. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb +86 -0
  169. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_export_result.rb +70 -0
  170. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb +84 -0
  171. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb +47 -0
  172. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb +46 -0
  173. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb +100 -0
  174. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_manage_deployments_parameters.rb +128 -0
  175. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb +79 -0
  176. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_resource.rb +353 -0
  177. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb +61 -0
  178. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb +76 -0
  179. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb +310 -0
  180. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb +72 -0
  181. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_protocol_contract.rb +16 -0
  182. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_type_contract.rb +16 -0
  183. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/api_update_contract.rb +152 -0
  184. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/async_operation_state.rb +18 -0
  185. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb +47 -0
  186. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/authorization_server_collection.rb +109 -0
  187. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb +65 -0
  188. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_base_parameters.rb +225 -0
  189. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_collection.rb +109 -0
  190. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_contract.rb +211 -0
  191. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb +135 -0
  192. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_protocol.rb +16 -0
  193. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb +74 -0
  194. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_response.rb +203 -0
  195. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/backend_update_parameters.rb +196 -0
  196. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/bearer_token_sending_methods_contract.rb +16 -0
  197. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_collection.rb +109 -0
  198. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_contract.rb +84 -0
  199. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb +58 -0
  200. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/certificate_information.rb +70 -0
  201. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/client_authentication_method_contract.rb +16 -0
  202. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb +104 -0
  203. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/connectivity_status_type.rb +17 -0
  204. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb +59 -0
  205. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_body_contract.rb +79 -0
  206. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_field_contract.rb +68 -0
  207. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/error_response.rb +57 -0
  208. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb +46 -0
  209. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/grant_types_contract.rb +18 -0
  210. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_collection.rb +109 -0
  211. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_contract.rb +120 -0
  212. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_create_parameters.rb +88 -0
  213. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_type_contract.rb +17 -0
  214. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/group_update_parameters.rb +88 -0
  215. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/hostname_configuration.rb +71 -0
  216. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/hostname_type.rb +18 -0
  217. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/http_status_code.rb +20 -0
  218. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_contract.rb +106 -0
  219. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_list.rb +56 -0
  220. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_name_type.rb +20 -0
  221. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb +91 -0
  222. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/key_type_contract.rb +16 -0
  223. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_collection.rb +109 -0
  224. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_create_parameters.rb +91 -0
  225. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_response.rb +111 -0
  226. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/logger_update_parameters.rb +90 -0
  227. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/method_contract.rb +22 -0
  228. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/name_availability_reason.rb +17 -0
  229. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/network_status_contract.rb +75 -0
  230. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb +57 -0
  231. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_contract.rb +300 -0
  232. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/oauth2authorization_server_update_contract.rb +285 -0
  233. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb +109 -0
  234. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb +106 -0
  235. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_create_contract.rb +95 -0
  236. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb +95 -0
  237. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation.rb +58 -0
  238. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_collection.rb +109 -0
  239. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_contract.rb +148 -0
  240. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_display.rb +80 -0
  241. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb +103 -0
  242. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_list_result.rb +101 -0
  243. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_result_contract.rb +110 -0
  244. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/operation_update_contract.rb +148 -0
  245. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/parameter_contract.rb +109 -0
  246. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_scope_contract.rb +19 -0
  247. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb +85 -0
  248. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb +55 -0
  249. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_collection.rb +109 -0
  250. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_contract.rb +159 -0
  251. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_state_contract.rb +16 -0
  252. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/product_update_parameters.rb +139 -0
  253. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_collection.rb +109 -0
  254. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_contract.rb +118 -0
  255. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_create_parameters.rb +103 -0
  256. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/property_update_parameters.rb +103 -0
  257. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_collection.rb +77 -0
  258. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_contract.rb +108 -0
  259. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb +57 -0
  260. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_contract.rb +57 -0
  261. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/region_list_result.rb +55 -0
  262. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_collection.rb +109 -0
  263. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/report_record_contract.rb +336 -0
  264. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/reports_aggregation.rb +21 -0
  265. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/representation_contract.rb +58 -0
  266. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/request_contract.rb +109 -0
  267. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/resource.rb +101 -0
  268. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/result_contract.rb +82 -0
  269. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb +60 -0
  270. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/sku_type.rb +17 -0
  271. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_collection.rb +109 -0
  272. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_contract.rb +226 -0
  273. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb +128 -0
  274. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb +57 -0
  275. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_state_contract.rb +20 -0
  276. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb +142 -0
  277. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb +121 -0
  278. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb +57 -0
  279. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_collection.rb +109 -0
  280. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_contract.rb +138 -0
  281. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_create_parameters.rb +120 -0
  282. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_collection.rb +55 -0
  283. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_identity_contract.rb +57 -0
  284. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_state_contract.rb +16 -0
  285. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_parameters.rb +64 -0
  286. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_token_result.rb +46 -0
  287. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/user_update_parameters.rb +111 -0
  288. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb +87 -0
  289. data/lib/2016-10-10/generated/azure_mgmt_api_management/models/virtual_network_type.rb +17 -0
  290. data/lib/2016-10-10/generated/azure_mgmt_api_management/module_definition.rb +9 -0
  291. data/lib/2016-10-10/generated/azure_mgmt_api_management/network_status.rb +126 -0
  292. data/lib/2016-10-10/generated/azure_mgmt_api_management/open_id_connect_providers.rb +697 -0
  293. data/lib/2016-10-10/generated/azure_mgmt_api_management/policy_snippets.rb +126 -0
  294. data/lib/2016-10-10/generated/azure_mgmt_api_management/product_apis.rb +515 -0
  295. data/lib/2016-10-10/generated/azure_mgmt_api_management/product_groups.rb +524 -0
  296. data/lib/2016-10-10/generated/azure_mgmt_api_management/product_policy.rb +364 -0
  297. data/lib/2016-10-10/generated/azure_mgmt_api_management/product_subscriptions.rb +312 -0
  298. data/lib/2016-10-10/generated/azure_mgmt_api_management/products.rb +737 -0
  299. data/lib/2016-10-10/generated/azure_mgmt_api_management/properties.rb +268 -0
  300. data/lib/2016-10-10/generated/azure_mgmt_api_management/property.rb +451 -0
  301. data/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_counter_keys.rb +238 -0
  302. data/lib/2016-10-10/generated/azure_mgmt_api_management/quota_by_period_keys.rb +237 -0
  303. data/lib/2016-10-10/generated/azure_mgmt_api_management/regions.rb +120 -0
  304. data/lib/2016-10-10/generated/azure_mgmt_api_management/reports.rb +281 -0
  305. data/lib/2016-10-10/generated/azure_mgmt_api_management/subscriptions.rb +922 -0
  306. data/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access.rb +394 -0
  307. data/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_access_git.rb +288 -0
  308. data/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration.rb +505 -0
  309. data/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_configuration_sync_state.rb +123 -0
  310. data/lib/2016-10-10/generated/azure_mgmt_api_management/tenant_policy.rb +334 -0
  311. data/lib/2016-10-10/generated/azure_mgmt_api_management/user_groups.rb +287 -0
  312. data/lib/2016-10-10/generated/azure_mgmt_api_management/user_identities.rb +130 -0
  313. data/lib/2016-10-10/generated/azure_mgmt_api_management/user_subscriptions.rb +312 -0
  314. data/lib/2016-10-10/generated/azure_mgmt_api_management/users.rb +993 -0
  315. data/lib/2018-01-01/generated/azure_mgmt_api_management.rb +281 -0
  316. data/lib/2018-01-01/generated/azure_mgmt_api_management/api.rb +1144 -0
  317. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic.rb +874 -0
  318. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_diagnostic_logger.rb +649 -0
  319. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_export.rb +147 -0
  320. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_client.rb +352 -0
  321. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_operations.rb +222 -0
  322. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_management_service.rb +1914 -0
  323. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation.rb +905 -0
  324. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_operation_policy.rb +639 -0
  325. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_policy.rb +589 -0
  326. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_product.rb +272 -0
  327. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_release.rb +893 -0
  328. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_revisions.rb +280 -0
  329. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_schema.rb +738 -0
  330. data/lib/2018-01-01/generated/azure_mgmt_api_management/api_version_set.rb +864 -0
  331. data/lib/2018-01-01/generated/azure_mgmt_api_management/authorization_server.rb +819 -0
  332. data/lib/2018-01-01/generated/azure_mgmt_api_management/backend.rb +931 -0
  333. data/lib/2018-01-01/generated/azure_mgmt_api_management/certificate.rb +730 -0
  334. data/lib/2018-01-01/generated/azure_mgmt_api_management/delegation_settings.rb +416 -0
  335. data/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic.rb +812 -0
  336. data/lib/2018-01-01/generated/azure_mgmt_api_management/diagnostic_logger.rb +614 -0
  337. data/lib/2018-01-01/generated/azure_mgmt_api_management/email_template.rb +896 -0
  338. data/lib/2018-01-01/generated/azure_mgmt_api_management/group.rb +839 -0
  339. data/lib/2018-01-01/generated/azure_mgmt_api_management/group_user.rb +657 -0
  340. data/lib/2018-01-01/generated/azure_mgmt_api_management/identity_provider.rb +796 -0
  341. data/lib/2018-01-01/generated/azure_mgmt_api_management/logger.rb +819 -0
  342. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_contract.rb +80 -0
  343. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb +48 -0
  344. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/additional_location.rb +107 -0
  345. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_collection.rb +98 -0
  346. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract.rb +260 -0
  347. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_contract_properties.rb +200 -0
  348. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb +285 -0
  349. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb +57 -0
  350. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb +151 -0
  351. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_export_result.rb +47 -0
  352. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_apply_network_configuration_parameters.rb +49 -0
  353. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb +84 -0
  354. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb +321 -0
  355. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb +47 -0
  356. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb +47 -0
  357. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_identity.rb +73 -0
  358. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb +100 -0
  359. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb +81 -0
  360. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_resource.rb +441 -0
  361. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb +60 -0
  362. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb +77 -0
  363. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb +430 -0
  364. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb +72 -0
  365. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_collection.rb +98 -0
  366. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_release_contract.rb +110 -0
  367. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_collection.rb +98 -0
  368. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb +145 -0
  369. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb +88 -0
  370. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_tag_resource_contract_properties.rb +199 -0
  371. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_type.rb +16 -0
  372. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_update_contract.rb +221 -0
  373. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_collection.rb +98 -0
  374. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract.rb +133 -0
  375. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb +96 -0
  376. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_entity_base.rb +78 -0
  377. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/api_version_set_update_parameters.rb +106 -0
  378. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/apim_resource.rb +91 -0
  379. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/async_operation_status.rb +18 -0
  380. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb +48 -0
  381. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_method.rb +22 -0
  382. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_collection.rb +109 -0
  383. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract.rb +309 -0
  384. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_contract_base_properties.rb +211 -0
  385. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/authorization_server_update_contract.rb +309 -0
  386. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb +65 -0
  387. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_base_parameters.rb +131 -0
  388. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_collection.rb +98 -0
  389. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_contract.rb +185 -0
  390. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb +124 -0
  391. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_properties.rb +48 -0
  392. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_protocol.rb +16 -0
  393. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb +74 -0
  394. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_reconnect_contract.rb +74 -0
  395. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_service_fabric_cluster_properties.rb +119 -0
  396. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_tls_properties.rb +63 -0
  397. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/backend_update_parameters.rb +158 -0
  398. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/bearer_token_sending_method.rb +16 -0
  399. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_collection.rb +98 -0
  400. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_configuration.rb +85 -0
  401. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_contract.rb +98 -0
  402. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb +58 -0
  403. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/certificate_information.rb +70 -0
  404. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/client_authentication_method.rb +16 -0
  405. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/confirmation.rb +16 -0
  406. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb +107 -0
  407. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/connectivity_status_type.rb +17 -0
  408. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/content_format.rb +20 -0
  409. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb +59 -0
  410. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_collection.rb +98 -0
  411. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/diagnostic_contract.rb +74 -0
  412. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_collection.rb +98 -0
  413. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_contract.rb +147 -0
  414. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_parameters_contract_properties.rb +83 -0
  415. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/email_template_update_parameters.rb +107 -0
  416. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_field_contract.rb +68 -0
  417. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/error_response.rb +79 -0
  418. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/export_format.rb +17 -0
  419. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb +46 -0
  420. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/grant_type.rb +18 -0
  421. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_collection.rb +98 -0
  422. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract.rb +131 -0
  423. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_contract_properties.rb +104 -0
  424. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_create_parameters.rb +88 -0
  425. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_type.rb +17 -0
  426. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/group_update_parameters.rb +88 -0
  427. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb +139 -0
  428. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_configuration_old.rb +71 -0
  429. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/hostname_type.rb +18 -0
  430. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb +131 -0
  431. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_contract.rb +191 -0
  432. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_list.rb +99 -0
  433. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_type.rb +20 -0
  434. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb +164 -0
  435. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/key_type.rb +16 -0
  436. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_collection.rb +109 -0
  437. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_contract.rb +121 -0
  438. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_type.rb +16 -0
  439. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/logger_update_contract.rb +89 -0
  440. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/name_availability_reason.rb +17 -0
  441. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract.rb +75 -0
  442. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/network_status_contract_by_location.rb +61 -0
  443. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_collection.rb +98 -0
  444. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_contract.rb +100 -0
  445. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/notification_name.rb +21 -0
  446. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb +57 -0
  447. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb +98 -0
  448. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb +122 -0
  449. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb +95 -0
  450. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation.rb +80 -0
  451. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_collection.rb +98 -0
  452. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_contract.rb +185 -0
  453. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_display.rb +80 -0
  454. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb +114 -0
  455. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_list_result.rb +101 -0
  456. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_contract.rb +134 -0
  457. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_result_log_item_contract.rb +69 -0
  458. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_tag_resource_contract_properties.rb +134 -0
  459. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb +158 -0
  460. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/parameter_contract.rb +109 -0
  461. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_collection.rb +66 -0
  462. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_content_format.rb +16 -0
  463. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_contract.rb +86 -0
  464. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_scope_contract.rb +19 -0
  465. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb +83 -0
  466. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb +55 -0
  467. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_delegation_settings.rb +111 -0
  468. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signin_settings.rb +73 -0
  469. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/portal_signup_settings.rb +86 -0
  470. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_collection.rb +98 -0
  471. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_contract.rb +167 -0
  472. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_entity_base_parameters.rb +125 -0
  473. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_state.rb +16 -0
  474. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_tag_resource_contract_properties.rb +115 -0
  475. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/product_update_parameters.rb +140 -0
  476. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_collection.rb +98 -0
  477. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_contract.rb +130 -0
  478. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_entity_base_parameters.rb +70 -0
  479. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb +103 -0
  480. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/protocol.rb +16 -0
  481. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_collection.rb +77 -0
  482. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_contract.rb +104 -0
  483. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb +57 -0
  484. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb +57 -0
  485. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_collection.rb +66 -0
  486. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_email_contract.rb +73 -0
  487. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_collection.rb +66 -0
  488. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipient_user_contract.rb +73 -0
  489. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/recipients_contract_properties.rb +73 -0
  490. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_contract.rb +69 -0
  491. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/region_list_result.rb +109 -0
  492. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb +46 -0
  493. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_collection.rb +109 -0
  494. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/report_record_contract.rb +338 -0
  495. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/representation_contract.rb +106 -0
  496. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_contract.rb +109 -0
  497. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_collection.rb +66 -0
  498. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/request_report_record_contract.rb +245 -0
  499. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/resource.rb +71 -0
  500. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/response_contract.rb +99 -0
  501. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb +60 -0
  502. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_collection.rb +98 -0
  503. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/schema_contract.rb +87 -0
  504. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/sku_type.rb +18 -0
  505. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/soap_api_type.rb +16 -0
  506. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_collection.rb +98 -0
  507. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_contract.rb +244 -0
  508. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb +128 -0
  509. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb +57 -0
  510. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_state.rb +20 -0
  511. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb +146 -0
  512. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.rb +47 -0
  513. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_collection.rb +98 -0
  514. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_contract.rb +77 -0
  515. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb +50 -0
  516. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_collection.rb +98 -0
  517. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_contract.rb +114 -0
  518. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb +72 -0
  519. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_collection.rb +109 -0
  520. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_resource_contract.rb +86 -0
  521. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tag_tag_resource_contract_properties.rb +61 -0
  522. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/template_name.rb +28 -0
  523. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb +121 -0
  524. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/terms_of_service_properties.rb +68 -0
  525. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb +57 -0
  526. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_collection.rb +98 -0
  527. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_contract.rb +179 -0
  528. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb +154 -0
  529. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb +83 -0
  530. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_collection.rb +109 -0
  531. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_identity_contract.rb +57 -0
  532. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_state.rb +18 -0
  533. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_parameters.rb +64 -0
  534. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_token_result.rb +46 -0
  535. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb +140 -0
  536. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/versioning_scheme.rb +17 -0
  537. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb +76 -0
  538. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/virtual_network_type.rb +17 -0
  539. data/lib/2018-01-01/generated/azure_mgmt_api_management/models/x509certificate_name.rb +57 -0
  540. data/lib/2018-01-01/generated/azure_mgmt_api_management/module_definition.rb +9 -0
  541. data/lib/2018-01-01/generated/azure_mgmt_api_management/network_status.rb +254 -0
  542. data/lib/2018-01-01/generated/azure_mgmt_api_management/notification.rb +469 -0
  543. data/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_email.rb +474 -0
  544. data/lib/2018-01-01/generated/azure_mgmt_api_management/notification_recipient_user.rb +495 -0
  545. data/lib/2018-01-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb +807 -0
  546. data/lib/2018-01-01/generated/azure_mgmt_api_management/operation_operations.rb +316 -0
  547. data/lib/2018-01-01/generated/azure_mgmt_api_management/policy.rb +526 -0
  548. data/lib/2018-01-01/generated/azure_mgmt_api_management/policy_snippets.rb +126 -0
  549. data/lib/2018-01-01/generated/azure_mgmt_api_management/product.rb +862 -0
  550. data/lib/2018-01-01/generated/azure_mgmt_api_management/product_api.rb +645 -0
  551. data/lib/2018-01-01/generated/azure_mgmt_api_management/product_group.rb +643 -0
  552. data/lib/2018-01-01/generated/azure_mgmt_api_management/product_policy.rb +571 -0
  553. data/lib/2018-01-01/generated/azure_mgmt_api_management/product_subscriptions.rb +312 -0
  554. data/lib/2018-01-01/generated/azure_mgmt_api_management/property.rb +804 -0
  555. data/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_counter_keys.rb +262 -0
  556. data/lib/2018-01-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb +261 -0
  557. data/lib/2018-01-01/generated/azure_mgmt_api_management/regions.rb +230 -0
  558. data/lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb +1690 -0
  559. data/lib/2018-01-01/generated/azure_mgmt_api_management/sign_in_settings.rb +416 -0
  560. data/lib/2018-01-01/generated/azure_mgmt_api_management/sign_up_settings.rb +416 -0
  561. data/lib/2018-01-01/generated/azure_mgmt_api_management/subscription.rb +1070 -0
  562. data/lib/2018-01-01/generated/azure_mgmt_api_management/tag.rb +3081 -0
  563. data/lib/2018-01-01/generated/azure_mgmt_api_management/tag_description.rb +787 -0
  564. data/lib/2018-01-01/generated/azure_mgmt_api_management/tag_resource.rb +356 -0
  565. data/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access.rb +401 -0
  566. data/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_access_git.rb +291 -0
  567. data/lib/2018-01-01/generated/azure_mgmt_api_management/tenant_configuration.rb +607 -0
  568. data/lib/2018-01-01/generated/azure_mgmt_api_management/user.rb +1099 -0
  569. data/lib/2018-01-01/generated/azure_mgmt_api_management/user_group.rb +287 -0
  570. data/lib/2018-01-01/generated/azure_mgmt_api_management/user_identities.rb +242 -0
  571. data/lib/2018-01-01/generated/azure_mgmt_api_management/user_subscription.rb +312 -0
  572. data/lib/azure_mgmt_api_management.rb +7 -0
  573. data/lib/module_definition.rb +7 -0
  574. data/lib/profiles/latest/apimanagement_latest_profile_client.rb +40 -0
  575. data/lib/profiles/latest/apimanagement_module_definition.rb +8 -0
  576. data/lib/profiles/latest/modules/apimanagement_profile_module.rb +963 -0
  577. data/lib/version.rb +7 -0
  578. metadata +694 -0
@@ -0,0 +1,3081 @@
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::ApiManagement::Mgmt::V2018_01_01
7
+ #
8
+ # ApiManagement Client
9
+ #
10
+ class Tag
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Tag class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ApiManagementClient] reference to the ApiManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists a collection of tags defined within a service instance.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param service_name [String] The name of the API Management service.
29
+ # @param filter [String] | Field | Supported operators | Supported
30
+ # functions |
31
+ # |-------------|------------------------|---------------------------------------------|
32
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
33
+ # endswith |
34
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
35
+ # endswith |
36
+ # @param top [Integer] Number of records to return.
37
+ # @param skip [Integer] Number of records to skip.
38
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
+ # will be added to the HTTP request.
40
+ #
41
+ # @return [Array<TagContract>] operation results.
42
+ #
43
+ def list_by_service(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil)
44
+ first_page = list_by_service_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers)
45
+ first_page.get_all_items
46
+ end
47
+
48
+ #
49
+ # Lists a collection of tags defined within a service instance.
50
+ #
51
+ # @param resource_group_name [String] The name of the resource group.
52
+ # @param service_name [String] The name of the API Management service.
53
+ # @param filter [String] | Field | Supported operators | Supported
54
+ # functions |
55
+ # |-------------|------------------------|---------------------------------------------|
56
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
57
+ # endswith |
58
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
59
+ # endswith |
60
+ # @param top [Integer] Number of records to return.
61
+ # @param skip [Integer] Number of records to skip.
62
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
63
+ # will be added to the HTTP request.
64
+ #
65
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
66
+ #
67
+ def list_by_service_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil)
68
+ list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
69
+ end
70
+
71
+ #
72
+ # Lists a collection of tags defined within a service instance.
73
+ #
74
+ # @param resource_group_name [String] The name of the resource group.
75
+ # @param service_name [String] The name of the API Management service.
76
+ # @param filter [String] | Field | Supported operators | Supported
77
+ # functions |
78
+ # |-------------|------------------------|---------------------------------------------|
79
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
80
+ # endswith |
81
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
82
+ # endswith |
83
+ # @param top [Integer] Number of records to return.
84
+ # @param skip [Integer] Number of records to skip.
85
+ # @param [Hash{String => String}] A hash of custom headers that will be added
86
+ # to the HTTP request.
87
+ #
88
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
89
+ #
90
+ def list_by_service_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil)
91
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
92
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
93
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
94
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
95
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
96
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
97
+ fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0
98
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
99
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
100
+
101
+
102
+ request_headers = {}
103
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
104
+
105
+ # Set Headers
106
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
107
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
108
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags'
109
+
110
+ request_url = @base_url || @client.base_url
111
+
112
+ options = {
113
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
114
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
115
+ query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version},
116
+ headers: request_headers.merge(custom_headers || {}),
117
+ base_url: request_url
118
+ }
119
+ promise = @client.make_request_async(:get, path_template, options)
120
+
121
+ promise = promise.then do |result|
122
+ http_response = result.response
123
+ status_code = http_response.status
124
+ response_content = http_response.body
125
+ unless status_code == 200
126
+ error_model = JSON.load(response_content)
127
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
128
+ end
129
+
130
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
131
+ # Deserialize Response
132
+ if status_code == 200
133
+ begin
134
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
135
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCollection.mapper()
136
+ result.body = @client.deserialize(result_mapper, parsed_response)
137
+ rescue Exception => e
138
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
139
+ end
140
+ end
141
+
142
+ result
143
+ end
144
+
145
+ promise.execute
146
+ end
147
+
148
+ #
149
+ # Gets the entity state version of the tag specified by its identifier.
150
+ #
151
+ # @param resource_group_name [String] The name of the resource group.
152
+ # @param service_name [String] The name of the API Management service.
153
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
154
+ # Management service instance.
155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
+ # will be added to the HTTP request.
157
+ #
158
+ #
159
+ def get_entity_state(resource_group_name, service_name, tag_id, custom_headers:nil)
160
+ response = get_entity_state_async(resource_group_name, service_name, tag_id, custom_headers:custom_headers).value!
161
+ nil
162
+ end
163
+
164
+ #
165
+ # Gets the entity state version of the tag specified by its identifier.
166
+ #
167
+ # @param resource_group_name [String] The name of the resource group.
168
+ # @param service_name [String] The name of the API Management service.
169
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
170
+ # Management service instance.
171
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
172
+ # will be added to the HTTP request.
173
+ #
174
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
175
+ #
176
+ def get_entity_state_with_http_info(resource_group_name, service_name, tag_id, custom_headers:nil)
177
+ get_entity_state_async(resource_group_name, service_name, tag_id, custom_headers:custom_headers).value!
178
+ end
179
+
180
+ #
181
+ # Gets the entity state version of the tag specified by its identifier.
182
+ #
183
+ # @param resource_group_name [String] The name of the resource group.
184
+ # @param service_name [String] The name of the API Management service.
185
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
186
+ # Management service instance.
187
+ # @param [Hash{String => String}] A hash of custom headers that will be added
188
+ # to the HTTP request.
189
+ #
190
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
191
+ #
192
+ def get_entity_state_async(resource_group_name, service_name, tag_id, custom_headers:nil)
193
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
194
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
195
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
196
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
197
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
198
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
199
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
200
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
201
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
202
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
203
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
204
+
205
+
206
+ request_headers = {}
207
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
208
+
209
+ # Set Headers
210
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
211
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
212
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'
213
+
214
+ request_url = @base_url || @client.base_url
215
+
216
+ options = {
217
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
218
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
219
+ query_params: {'api-version' => @client.api_version},
220
+ headers: request_headers.merge(custom_headers || {}),
221
+ base_url: request_url
222
+ }
223
+ promise = @client.make_request_async(:head, path_template, options)
224
+
225
+ promise = promise.then do |result|
226
+ http_response = result.response
227
+ status_code = http_response.status
228
+ response_content = http_response.body
229
+ unless status_code == 200
230
+ error_model = JSON.load(response_content)
231
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
232
+ end
233
+
234
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
235
+
236
+ result
237
+ end
238
+
239
+ promise.execute
240
+ end
241
+
242
+ #
243
+ # Gets the details of the tag specified by its identifier.
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group.
246
+ # @param service_name [String] The name of the API Management service.
247
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
248
+ # Management service instance.
249
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
250
+ # will be added to the HTTP request.
251
+ #
252
+ # @return [TagContract] operation results.
253
+ #
254
+ def get(resource_group_name, service_name, tag_id, custom_headers:nil)
255
+ response = get_async(resource_group_name, service_name, tag_id, custom_headers:custom_headers).value!
256
+ response.body unless response.nil?
257
+ end
258
+
259
+ #
260
+ # Gets the details of the tag specified by its identifier.
261
+ #
262
+ # @param resource_group_name [String] The name of the resource group.
263
+ # @param service_name [String] The name of the API Management service.
264
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
265
+ # Management service instance.
266
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
267
+ # will be added to the HTTP request.
268
+ #
269
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
270
+ #
271
+ def get_with_http_info(resource_group_name, service_name, tag_id, custom_headers:nil)
272
+ get_async(resource_group_name, service_name, tag_id, custom_headers:custom_headers).value!
273
+ end
274
+
275
+ #
276
+ # Gets the details of the tag specified by its identifier.
277
+ #
278
+ # @param resource_group_name [String] The name of the resource group.
279
+ # @param service_name [String] The name of the API Management service.
280
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
281
+ # Management service instance.
282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
283
+ # to the HTTP request.
284
+ #
285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
+ #
287
+ def get_async(resource_group_name, service_name, tag_id, custom_headers:nil)
288
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
290
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
291
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
292
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
293
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
294
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
295
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
296
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
297
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
298
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
299
+
300
+
301
+ request_headers = {}
302
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
303
+
304
+ # Set Headers
305
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
306
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
307
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'
308
+
309
+ request_url = @base_url || @client.base_url
310
+
311
+ options = {
312
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
313
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
314
+ query_params: {'api-version' => @client.api_version},
315
+ headers: request_headers.merge(custom_headers || {}),
316
+ base_url: request_url
317
+ }
318
+ promise = @client.make_request_async(:get, path_template, options)
319
+
320
+ promise = promise.then do |result|
321
+ http_response = result.response
322
+ status_code = http_response.status
323
+ response_content = http_response.body
324
+ unless status_code == 200
325
+ error_model = JSON.load(response_content)
326
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
327
+ end
328
+
329
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
330
+ # Deserialize Response
331
+ if status_code == 200
332
+ begin
333
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
334
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
335
+ result.body = @client.deserialize(result_mapper, parsed_response)
336
+ rescue Exception => e
337
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
338
+ end
339
+ end
340
+
341
+ result
342
+ end
343
+
344
+ promise.execute
345
+ end
346
+
347
+ #
348
+ # Creates a tag.
349
+ #
350
+ # @param resource_group_name [String] The name of the resource group.
351
+ # @param service_name [String] The name of the API Management service.
352
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
353
+ # Management service instance.
354
+ # @param parameters [TagCreateUpdateParameters] Create parameters.
355
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
356
+ # will be added to the HTTP request.
357
+ #
358
+ # @return [TagContract] operation results.
359
+ #
360
+ def create_or_update(resource_group_name, service_name, tag_id, parameters, custom_headers:nil)
361
+ response = create_or_update_async(resource_group_name, service_name, tag_id, parameters, custom_headers:custom_headers).value!
362
+ response.body unless response.nil?
363
+ end
364
+
365
+ #
366
+ # Creates a tag.
367
+ #
368
+ # @param resource_group_name [String] The name of the resource group.
369
+ # @param service_name [String] The name of the API Management service.
370
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
371
+ # Management service instance.
372
+ # @param parameters [TagCreateUpdateParameters] Create parameters.
373
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
374
+ # will be added to the HTTP request.
375
+ #
376
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
377
+ #
378
+ def create_or_update_with_http_info(resource_group_name, service_name, tag_id, parameters, custom_headers:nil)
379
+ create_or_update_async(resource_group_name, service_name, tag_id, parameters, custom_headers:custom_headers).value!
380
+ end
381
+
382
+ #
383
+ # Creates a tag.
384
+ #
385
+ # @param resource_group_name [String] The name of the resource group.
386
+ # @param service_name [String] The name of the API Management service.
387
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
388
+ # Management service instance.
389
+ # @param parameters [TagCreateUpdateParameters] Create parameters.
390
+ # @param [Hash{String => String}] A hash of custom headers that will be added
391
+ # to the HTTP request.
392
+ #
393
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
394
+ #
395
+ def create_or_update_async(resource_group_name, service_name, tag_id, parameters, custom_headers:nil)
396
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
397
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
398
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
399
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
400
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
401
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
402
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
403
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
404
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
405
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
406
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
407
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
408
+
409
+
410
+ request_headers = {}
411
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
412
+
413
+ # Set Headers
414
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
415
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
416
+
417
+ # Serialize Request
418
+ request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCreateUpdateParameters.mapper()
419
+ request_content = @client.serialize(request_mapper, parameters)
420
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
421
+
422
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'
423
+
424
+ request_url = @base_url || @client.base_url
425
+
426
+ options = {
427
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
428
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
429
+ query_params: {'api-version' => @client.api_version},
430
+ body: request_content,
431
+ headers: request_headers.merge(custom_headers || {}),
432
+ base_url: request_url
433
+ }
434
+ promise = @client.make_request_async(:put, path_template, options)
435
+
436
+ promise = promise.then do |result|
437
+ http_response = result.response
438
+ status_code = http_response.status
439
+ response_content = http_response.body
440
+ unless status_code == 201 || status_code == 200
441
+ error_model = JSON.load(response_content)
442
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
443
+ end
444
+
445
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
446
+ # Deserialize Response
447
+ if status_code == 201
448
+ begin
449
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
450
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
451
+ result.body = @client.deserialize(result_mapper, parsed_response)
452
+ rescue Exception => e
453
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
454
+ end
455
+ end
456
+ # Deserialize Response
457
+ if status_code == 200
458
+ begin
459
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
460
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
461
+ result.body = @client.deserialize(result_mapper, parsed_response)
462
+ rescue Exception => e
463
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
464
+ end
465
+ end
466
+
467
+ result
468
+ end
469
+
470
+ promise.execute
471
+ end
472
+
473
+ #
474
+ # Updates the details of the tag specified by its identifier.
475
+ #
476
+ # @param resource_group_name [String] The name of the resource group.
477
+ # @param service_name [String] The name of the API Management service.
478
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
479
+ # Management service instance.
480
+ # @param parameters [TagCreateUpdateParameters] Update parameters.
481
+ # @param if_match [String] ETag of the Entity. ETag should match the current
482
+ # entity state from the header response of the GET request or it should be *
483
+ # for unconditional update.
484
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
485
+ # will be added to the HTTP request.
486
+ #
487
+ #
488
+ def update(resource_group_name, service_name, tag_id, parameters, if_match, custom_headers:nil)
489
+ response = update_async(resource_group_name, service_name, tag_id, parameters, if_match, custom_headers:custom_headers).value!
490
+ nil
491
+ end
492
+
493
+ #
494
+ # Updates the details of the tag specified by its identifier.
495
+ #
496
+ # @param resource_group_name [String] The name of the resource group.
497
+ # @param service_name [String] The name of the API Management service.
498
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
499
+ # Management service instance.
500
+ # @param parameters [TagCreateUpdateParameters] Update parameters.
501
+ # @param if_match [String] ETag of the Entity. ETag should match the current
502
+ # entity state from the header response of the GET request or it should be *
503
+ # for unconditional update.
504
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
505
+ # will be added to the HTTP request.
506
+ #
507
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
508
+ #
509
+ def update_with_http_info(resource_group_name, service_name, tag_id, parameters, if_match, custom_headers:nil)
510
+ update_async(resource_group_name, service_name, tag_id, parameters, if_match, custom_headers:custom_headers).value!
511
+ end
512
+
513
+ #
514
+ # Updates the details of the tag specified by its identifier.
515
+ #
516
+ # @param resource_group_name [String] The name of the resource group.
517
+ # @param service_name [String] The name of the API Management service.
518
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
519
+ # Management service instance.
520
+ # @param parameters [TagCreateUpdateParameters] Update parameters.
521
+ # @param if_match [String] ETag of the Entity. ETag should match the current
522
+ # entity state from the header response of the GET request or it should be *
523
+ # for unconditional update.
524
+ # @param [Hash{String => String}] A hash of custom headers that will be added
525
+ # to the HTTP request.
526
+ #
527
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
528
+ #
529
+ def update_async(resource_group_name, service_name, tag_id, parameters, if_match, custom_headers:nil)
530
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
531
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
532
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
533
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
534
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
535
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
536
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
537
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
538
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
539
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
540
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
541
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
542
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
543
+
544
+
545
+ request_headers = {}
546
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
547
+
548
+ # Set Headers
549
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
550
+ request_headers['If-Match'] = if_match unless if_match.nil?
551
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
552
+
553
+ # Serialize Request
554
+ request_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCreateUpdateParameters.mapper()
555
+ request_content = @client.serialize(request_mapper, parameters)
556
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
557
+
558
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'
559
+
560
+ request_url = @base_url || @client.base_url
561
+
562
+ options = {
563
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
564
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
565
+ query_params: {'api-version' => @client.api_version},
566
+ body: request_content,
567
+ headers: request_headers.merge(custom_headers || {}),
568
+ base_url: request_url
569
+ }
570
+ promise = @client.make_request_async(:patch, path_template, options)
571
+
572
+ promise = promise.then do |result|
573
+ http_response = result.response
574
+ status_code = http_response.status
575
+ response_content = http_response.body
576
+ unless status_code == 204
577
+ error_model = JSON.load(response_content)
578
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
579
+ end
580
+
581
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
582
+
583
+ result
584
+ end
585
+
586
+ promise.execute
587
+ end
588
+
589
+ #
590
+ # Deletes specific tag of the API Management service instance.
591
+ #
592
+ # @param resource_group_name [String] The name of the resource group.
593
+ # @param service_name [String] The name of the API Management service.
594
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
595
+ # Management service instance.
596
+ # @param if_match [String] ETag of the Entity. ETag should match the current
597
+ # entity state from the header response of the GET request or it should be *
598
+ # for unconditional update.
599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
+ # will be added to the HTTP request.
601
+ #
602
+ #
603
+ def delete(resource_group_name, service_name, tag_id, if_match, custom_headers:nil)
604
+ response = delete_async(resource_group_name, service_name, tag_id, if_match, custom_headers:custom_headers).value!
605
+ nil
606
+ end
607
+
608
+ #
609
+ # Deletes specific tag of the API Management service instance.
610
+ #
611
+ # @param resource_group_name [String] The name of the resource group.
612
+ # @param service_name [String] The name of the API Management service.
613
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
614
+ # Management service instance.
615
+ # @param if_match [String] ETag of the Entity. ETag should match the current
616
+ # entity state from the header response of the GET request or it should be *
617
+ # for unconditional update.
618
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
619
+ # will be added to the HTTP request.
620
+ #
621
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
622
+ #
623
+ def delete_with_http_info(resource_group_name, service_name, tag_id, if_match, custom_headers:nil)
624
+ delete_async(resource_group_name, service_name, tag_id, if_match, custom_headers:custom_headers).value!
625
+ end
626
+
627
+ #
628
+ # Deletes specific tag of the API Management service instance.
629
+ #
630
+ # @param resource_group_name [String] The name of the resource group.
631
+ # @param service_name [String] The name of the API Management service.
632
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
633
+ # Management service instance.
634
+ # @param if_match [String] ETag of the Entity. ETag should match the current
635
+ # entity state from the header response of the GET request or it should be *
636
+ # for unconditional update.
637
+ # @param [Hash{String => String}] A hash of custom headers that will be added
638
+ # to the HTTP request.
639
+ #
640
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
641
+ #
642
+ def delete_async(resource_group_name, service_name, tag_id, if_match, custom_headers:nil)
643
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
644
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
645
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
646
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
647
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
648
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
649
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
650
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
651
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
652
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
653
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
654
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
655
+
656
+
657
+ request_headers = {}
658
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
659
+
660
+ # Set Headers
661
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
662
+ request_headers['If-Match'] = if_match unless if_match.nil?
663
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
664
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}'
665
+
666
+ request_url = @base_url || @client.base_url
667
+
668
+ options = {
669
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
670
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
671
+ query_params: {'api-version' => @client.api_version},
672
+ headers: request_headers.merge(custom_headers || {}),
673
+ base_url: request_url
674
+ }
675
+ promise = @client.make_request_async(:delete, path_template, options)
676
+
677
+ promise = promise.then do |result|
678
+ http_response = result.response
679
+ status_code = http_response.status
680
+ response_content = http_response.body
681
+ unless status_code == 200 || status_code == 204
682
+ error_model = JSON.load(response_content)
683
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
684
+ end
685
+
686
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
687
+
688
+ result
689
+ end
690
+
691
+ promise.execute
692
+ end
693
+
694
+ #
695
+ # Lists all Tags associated with the API.
696
+ #
697
+ # @param resource_group_name [String] The name of the resource group.
698
+ # @param service_name [String] The name of the API Management service.
699
+ # @param api_id [String] API revision identifier. Must be unique in the current
700
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
701
+ # where n is the revision number.
702
+ # @param filter [String] | Field | Supported operators | Supported
703
+ # functions |
704
+ # |-------------|------------------------|---------------------------------------------|
705
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
706
+ # endswith |
707
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
708
+ # endswith |
709
+ # @param top [Integer] Number of records to return.
710
+ # @param skip [Integer] Number of records to skip.
711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
712
+ # will be added to the HTTP request.
713
+ #
714
+ # @return [Array<TagContract>] operation results.
715
+ #
716
+ def list_by_api(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
717
+ first_page = list_by_api_as_lazy(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers)
718
+ first_page.get_all_items
719
+ end
720
+
721
+ #
722
+ # Lists all Tags associated with the API.
723
+ #
724
+ # @param resource_group_name [String] The name of the resource group.
725
+ # @param service_name [String] The name of the API Management service.
726
+ # @param api_id [String] API revision identifier. Must be unique in the current
727
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
728
+ # where n is the revision number.
729
+ # @param filter [String] | Field | Supported operators | Supported
730
+ # functions |
731
+ # |-------------|------------------------|---------------------------------------------|
732
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
733
+ # endswith |
734
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
735
+ # endswith |
736
+ # @param top [Integer] Number of records to return.
737
+ # @param skip [Integer] Number of records to skip.
738
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
739
+ # will be added to the HTTP request.
740
+ #
741
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
742
+ #
743
+ def list_by_api_with_http_info(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
744
+ list_by_api_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
745
+ end
746
+
747
+ #
748
+ # Lists all Tags associated with the API.
749
+ #
750
+ # @param resource_group_name [String] The name of the resource group.
751
+ # @param service_name [String] The name of the API Management service.
752
+ # @param api_id [String] API revision identifier. Must be unique in the current
753
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
754
+ # where n is the revision number.
755
+ # @param filter [String] | Field | Supported operators | Supported
756
+ # functions |
757
+ # |-------------|------------------------|---------------------------------------------|
758
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
759
+ # endswith |
760
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
761
+ # endswith |
762
+ # @param top [Integer] Number of records to return.
763
+ # @param skip [Integer] Number of records to skip.
764
+ # @param [Hash{String => String}] A hash of custom headers that will be added
765
+ # to the HTTP request.
766
+ #
767
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
768
+ #
769
+ def list_by_api_async(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
770
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
771
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
772
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
773
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
774
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
775
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
776
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
777
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
778
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
779
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
780
+ fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0
781
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
782
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
783
+
784
+
785
+ request_headers = {}
786
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
787
+
788
+ # Set Headers
789
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
790
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
791
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags'
792
+
793
+ request_url = @base_url || @client.base_url
794
+
795
+ options = {
796
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
797
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'subscriptionId' => @client.subscription_id},
798
+ query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version},
799
+ headers: request_headers.merge(custom_headers || {}),
800
+ base_url: request_url
801
+ }
802
+ promise = @client.make_request_async(:get, path_template, options)
803
+
804
+ promise = promise.then do |result|
805
+ http_response = result.response
806
+ status_code = http_response.status
807
+ response_content = http_response.body
808
+ unless status_code == 200
809
+ error_model = JSON.load(response_content)
810
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
811
+ end
812
+
813
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
814
+ # Deserialize Response
815
+ if status_code == 200
816
+ begin
817
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
818
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCollection.mapper()
819
+ result.body = @client.deserialize(result_mapper, parsed_response)
820
+ rescue Exception => e
821
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
822
+ end
823
+ end
824
+
825
+ result
826
+ end
827
+
828
+ promise.execute
829
+ end
830
+
831
+ #
832
+ # Gets the entity state version of the tag specified by its identifier.
833
+ #
834
+ # @param resource_group_name [String] The name of the resource group.
835
+ # @param service_name [String] The name of the API Management service.
836
+ # @param api_id [String] API revision identifier. Must be unique in the current
837
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
838
+ # where n is the revision number.
839
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
840
+ # Management service instance.
841
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
842
+ # will be added to the HTTP request.
843
+ #
844
+ #
845
+ def get_entity_state_by_api(resource_group_name, service_name, api_id, tag_id, custom_headers:nil)
846
+ response = get_entity_state_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers:custom_headers).value!
847
+ nil
848
+ end
849
+
850
+ #
851
+ # Gets the entity state version of the tag specified by its identifier.
852
+ #
853
+ # @param resource_group_name [String] The name of the resource group.
854
+ # @param service_name [String] The name of the API Management service.
855
+ # @param api_id [String] API revision identifier. Must be unique in the current
856
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
857
+ # where n is the revision number.
858
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
859
+ # Management service instance.
860
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
861
+ # will be added to the HTTP request.
862
+ #
863
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
864
+ #
865
+ def get_entity_state_by_api_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers:nil)
866
+ get_entity_state_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers:custom_headers).value!
867
+ end
868
+
869
+ #
870
+ # Gets the entity state version of the tag specified by its identifier.
871
+ #
872
+ # @param resource_group_name [String] The name of the resource group.
873
+ # @param service_name [String] The name of the API Management service.
874
+ # @param api_id [String] API revision identifier. Must be unique in the current
875
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
876
+ # where n is the revision number.
877
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
878
+ # Management service instance.
879
+ # @param [Hash{String => String}] A hash of custom headers that will be added
880
+ # to the HTTP request.
881
+ #
882
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
883
+ #
884
+ def get_entity_state_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers:nil)
885
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
886
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
887
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
888
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
889
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
890
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
891
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
892
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
893
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
894
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
895
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
896
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
897
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
898
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
899
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
900
+
901
+
902
+ request_headers = {}
903
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
904
+
905
+ # Set Headers
906
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
907
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
908
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'
909
+
910
+ request_url = @base_url || @client.base_url
911
+
912
+ options = {
913
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
914
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
915
+ query_params: {'api-version' => @client.api_version},
916
+ headers: request_headers.merge(custom_headers || {}),
917
+ base_url: request_url
918
+ }
919
+ promise = @client.make_request_async(:head, path_template, options)
920
+
921
+ promise = promise.then do |result|
922
+ http_response = result.response
923
+ status_code = http_response.status
924
+ response_content = http_response.body
925
+ unless status_code == 200
926
+ error_model = JSON.load(response_content)
927
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
928
+ end
929
+
930
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
931
+
932
+ result
933
+ end
934
+
935
+ promise.execute
936
+ end
937
+
938
+ #
939
+ # Get tag associated with the API.
940
+ #
941
+ # @param resource_group_name [String] The name of the resource group.
942
+ # @param service_name [String] The name of the API Management service.
943
+ # @param api_id [String] API revision identifier. Must be unique in the current
944
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
945
+ # where n is the revision number.
946
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
947
+ # Management service instance.
948
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
949
+ # will be added to the HTTP request.
950
+ #
951
+ # @return [TagContract] operation results.
952
+ #
953
+ def get_by_api(resource_group_name, service_name, api_id, tag_id, custom_headers:nil)
954
+ response = get_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers:custom_headers).value!
955
+ response.body unless response.nil?
956
+ end
957
+
958
+ #
959
+ # Get tag associated with the API.
960
+ #
961
+ # @param resource_group_name [String] The name of the resource group.
962
+ # @param service_name [String] The name of the API Management service.
963
+ # @param api_id [String] API revision identifier. Must be unique in the current
964
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
965
+ # where n is the revision number.
966
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
967
+ # Management service instance.
968
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
969
+ # will be added to the HTTP request.
970
+ #
971
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
972
+ #
973
+ def get_by_api_with_http_info(resource_group_name, service_name, api_id, tag_id, custom_headers:nil)
974
+ get_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers:custom_headers).value!
975
+ end
976
+
977
+ #
978
+ # Get tag associated with the API.
979
+ #
980
+ # @param resource_group_name [String] The name of the resource group.
981
+ # @param service_name [String] The name of the API Management service.
982
+ # @param api_id [String] API revision identifier. Must be unique in the current
983
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
984
+ # where n is the revision number.
985
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
986
+ # Management service instance.
987
+ # @param [Hash{String => String}] A hash of custom headers that will be added
988
+ # to the HTTP request.
989
+ #
990
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
991
+ #
992
+ def get_by_api_async(resource_group_name, service_name, api_id, tag_id, custom_headers:nil)
993
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
994
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
995
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
996
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
997
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
998
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
999
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
1000
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
1001
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
1002
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
1003
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
1004
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
1005
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1006
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1007
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1008
+
1009
+
1010
+ request_headers = {}
1011
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1012
+
1013
+ # Set Headers
1014
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1015
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1016
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'
1017
+
1018
+ request_url = @base_url || @client.base_url
1019
+
1020
+ options = {
1021
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1022
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
1023
+ query_params: {'api-version' => @client.api_version},
1024
+ headers: request_headers.merge(custom_headers || {}),
1025
+ base_url: request_url
1026
+ }
1027
+ promise = @client.make_request_async(:get, path_template, options)
1028
+
1029
+ promise = promise.then do |result|
1030
+ http_response = result.response
1031
+ status_code = http_response.status
1032
+ response_content = http_response.body
1033
+ unless status_code == 200
1034
+ error_model = JSON.load(response_content)
1035
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1036
+ end
1037
+
1038
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1039
+ # Deserialize Response
1040
+ if status_code == 200
1041
+ begin
1042
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1043
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
1044
+ result.body = @client.deserialize(result_mapper, parsed_response)
1045
+ rescue Exception => e
1046
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1047
+ end
1048
+ end
1049
+
1050
+ result
1051
+ end
1052
+
1053
+ promise.execute
1054
+ end
1055
+
1056
+ #
1057
+ # Assign tag to the Api.
1058
+ #
1059
+ # @param resource_group_name [String] The name of the resource group.
1060
+ # @param service_name [String] The name of the API Management service.
1061
+ # @param api_id [String] API revision identifier. Must be unique in the current
1062
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1063
+ # where n is the revision number.
1064
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1065
+ # Management service instance.
1066
+ # @param if_match [String] ETag of the Entity. Not required when creating an
1067
+ # entity, but required when updating an entity.
1068
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1069
+ # will be added to the HTTP request.
1070
+ #
1071
+ # @return [TagContract] operation results.
1072
+ #
1073
+ def assign_to_api(resource_group_name, service_name, api_id, tag_id, if_match:nil, custom_headers:nil)
1074
+ response = assign_to_api_async(resource_group_name, service_name, api_id, tag_id, if_match:if_match, custom_headers:custom_headers).value!
1075
+ response.body unless response.nil?
1076
+ end
1077
+
1078
+ #
1079
+ # Assign tag to the Api.
1080
+ #
1081
+ # @param resource_group_name [String] The name of the resource group.
1082
+ # @param service_name [String] The name of the API Management service.
1083
+ # @param api_id [String] API revision identifier. Must be unique in the current
1084
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1085
+ # where n is the revision number.
1086
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1087
+ # Management service instance.
1088
+ # @param if_match [String] ETag of the Entity. Not required when creating an
1089
+ # entity, but required when updating an entity.
1090
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1091
+ # will be added to the HTTP request.
1092
+ #
1093
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1094
+ #
1095
+ def assign_to_api_with_http_info(resource_group_name, service_name, api_id, tag_id, if_match:nil, custom_headers:nil)
1096
+ assign_to_api_async(resource_group_name, service_name, api_id, tag_id, if_match:if_match, custom_headers:custom_headers).value!
1097
+ end
1098
+
1099
+ #
1100
+ # Assign tag to the Api.
1101
+ #
1102
+ # @param resource_group_name [String] The name of the resource group.
1103
+ # @param service_name [String] The name of the API Management service.
1104
+ # @param api_id [String] API revision identifier. Must be unique in the current
1105
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1106
+ # where n is the revision number.
1107
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1108
+ # Management service instance.
1109
+ # @param if_match [String] ETag of the Entity. Not required when creating an
1110
+ # entity, but required when updating an entity.
1111
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1112
+ # to the HTTP request.
1113
+ #
1114
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1115
+ #
1116
+ def assign_to_api_async(resource_group_name, service_name, api_id, tag_id, if_match:nil, custom_headers:nil)
1117
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1118
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1119
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1120
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1121
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1122
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
1123
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
1124
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
1125
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
1126
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
1127
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
1128
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
1129
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1130
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1131
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1132
+
1133
+
1134
+ request_headers = {}
1135
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1136
+
1137
+ # Set Headers
1138
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1139
+ request_headers['If-Match'] = if_match unless if_match.nil?
1140
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1141
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'
1142
+
1143
+ request_url = @base_url || @client.base_url
1144
+
1145
+ options = {
1146
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1147
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
1148
+ query_params: {'api-version' => @client.api_version},
1149
+ headers: request_headers.merge(custom_headers || {}),
1150
+ base_url: request_url
1151
+ }
1152
+ promise = @client.make_request_async(:put, path_template, options)
1153
+
1154
+ promise = promise.then do |result|
1155
+ http_response = result.response
1156
+ status_code = http_response.status
1157
+ response_content = http_response.body
1158
+ unless status_code == 201 || status_code == 200
1159
+ error_model = JSON.load(response_content)
1160
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1161
+ end
1162
+
1163
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1164
+ # Deserialize Response
1165
+ if status_code == 201
1166
+ begin
1167
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1168
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
1169
+ result.body = @client.deserialize(result_mapper, parsed_response)
1170
+ rescue Exception => e
1171
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1172
+ end
1173
+ end
1174
+ # Deserialize Response
1175
+ if status_code == 200
1176
+ begin
1177
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1178
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
1179
+ result.body = @client.deserialize(result_mapper, parsed_response)
1180
+ rescue Exception => e
1181
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1182
+ end
1183
+ end
1184
+
1185
+ result
1186
+ end
1187
+
1188
+ promise.execute
1189
+ end
1190
+
1191
+ #
1192
+ # Detach the tag from the Api.
1193
+ #
1194
+ # @param resource_group_name [String] The name of the resource group.
1195
+ # @param service_name [String] The name of the API Management service.
1196
+ # @param api_id [String] API revision identifier. Must be unique in the current
1197
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1198
+ # where n is the revision number.
1199
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1200
+ # Management service instance.
1201
+ # @param if_match [String] ETag of the Entity. ETag should match the current
1202
+ # entity state from the header response of the GET request or it should be *
1203
+ # for unconditional update.
1204
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1205
+ # will be added to the HTTP request.
1206
+ #
1207
+ #
1208
+ def detach_from_api(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:nil)
1209
+ response = detach_from_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:custom_headers).value!
1210
+ nil
1211
+ end
1212
+
1213
+ #
1214
+ # Detach the tag from the Api.
1215
+ #
1216
+ # @param resource_group_name [String] The name of the resource group.
1217
+ # @param service_name [String] The name of the API Management service.
1218
+ # @param api_id [String] API revision identifier. Must be unique in the current
1219
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1220
+ # where n is the revision number.
1221
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1222
+ # Management service instance.
1223
+ # @param if_match [String] ETag of the Entity. ETag should match the current
1224
+ # entity state from the header response of the GET request or it should be *
1225
+ # for unconditional update.
1226
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1227
+ # will be added to the HTTP request.
1228
+ #
1229
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1230
+ #
1231
+ def detach_from_api_with_http_info(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:nil)
1232
+ detach_from_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:custom_headers).value!
1233
+ end
1234
+
1235
+ #
1236
+ # Detach the tag from the Api.
1237
+ #
1238
+ # @param resource_group_name [String] The name of the resource group.
1239
+ # @param service_name [String] The name of the API Management service.
1240
+ # @param api_id [String] API revision identifier. Must be unique in the current
1241
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1242
+ # where n is the revision number.
1243
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1244
+ # Management service instance.
1245
+ # @param if_match [String] ETag of the Entity. ETag should match the current
1246
+ # entity state from the header response of the GET request or it should be *
1247
+ # for unconditional update.
1248
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1249
+ # to the HTTP request.
1250
+ #
1251
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1252
+ #
1253
+ def detach_from_api_async(resource_group_name, service_name, api_id, tag_id, if_match, custom_headers:nil)
1254
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1255
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1256
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1257
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1258
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1259
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
1260
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
1261
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
1262
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
1263
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
1264
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
1265
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
1266
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1267
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
1268
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1269
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1270
+
1271
+
1272
+ request_headers = {}
1273
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1274
+
1275
+ # Set Headers
1276
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1277
+ request_headers['If-Match'] = if_match unless if_match.nil?
1278
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1279
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}'
1280
+
1281
+ request_url = @base_url || @client.base_url
1282
+
1283
+ options = {
1284
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1285
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
1286
+ query_params: {'api-version' => @client.api_version},
1287
+ headers: request_headers.merge(custom_headers || {}),
1288
+ base_url: request_url
1289
+ }
1290
+ promise = @client.make_request_async(:delete, path_template, options)
1291
+
1292
+ promise = promise.then do |result|
1293
+ http_response = result.response
1294
+ status_code = http_response.status
1295
+ response_content = http_response.body
1296
+ unless status_code == 200 || status_code == 204
1297
+ error_model = JSON.load(response_content)
1298
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1299
+ end
1300
+
1301
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1302
+
1303
+ result
1304
+ end
1305
+
1306
+ promise.execute
1307
+ end
1308
+
1309
+ #
1310
+ # Lists all Tags associated with the Operation.
1311
+ #
1312
+ # @param resource_group_name [String] The name of the resource group.
1313
+ # @param service_name [String] The name of the API Management service.
1314
+ # @param api_id [String] API revision identifier. Must be unique in the current
1315
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1316
+ # where n is the revision number.
1317
+ # @param operation_id [String] Operation identifier within an API. Must be
1318
+ # unique in the current API Management service instance.
1319
+ # @param filter [String] | Field | Supported operators | Supported
1320
+ # functions |
1321
+ # |-------------|------------------------|---------------------------------------------|
1322
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1323
+ # endswith |
1324
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1325
+ # endswith |
1326
+ # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1327
+ # endswith |
1328
+ # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1329
+ # endswith |
1330
+ # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1331
+ # endswith |
1332
+ # @param top [Integer] Number of records to return.
1333
+ # @param skip [Integer] Number of records to skip.
1334
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1335
+ # will be added to the HTTP request.
1336
+ #
1337
+ # @return [Array<TagContract>] operation results.
1338
+ #
1339
+ def list_by_operation(resource_group_name, service_name, api_id, operation_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
1340
+ first_page = list_by_operation_as_lazy(resource_group_name, service_name, api_id, operation_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers)
1341
+ first_page.get_all_items
1342
+ end
1343
+
1344
+ #
1345
+ # Lists all Tags associated with the Operation.
1346
+ #
1347
+ # @param resource_group_name [String] The name of the resource group.
1348
+ # @param service_name [String] The name of the API Management service.
1349
+ # @param api_id [String] API revision identifier. Must be unique in the current
1350
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1351
+ # where n is the revision number.
1352
+ # @param operation_id [String] Operation identifier within an API. Must be
1353
+ # unique in the current API Management service instance.
1354
+ # @param filter [String] | Field | Supported operators | Supported
1355
+ # functions |
1356
+ # |-------------|------------------------|---------------------------------------------|
1357
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1358
+ # endswith |
1359
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1360
+ # endswith |
1361
+ # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1362
+ # endswith |
1363
+ # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1364
+ # endswith |
1365
+ # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1366
+ # endswith |
1367
+ # @param top [Integer] Number of records to return.
1368
+ # @param skip [Integer] Number of records to skip.
1369
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1370
+ # will be added to the HTTP request.
1371
+ #
1372
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1373
+ #
1374
+ def list_by_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
1375
+ list_by_operation_async(resource_group_name, service_name, api_id, operation_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
1376
+ end
1377
+
1378
+ #
1379
+ # Lists all Tags associated with the Operation.
1380
+ #
1381
+ # @param resource_group_name [String] The name of the resource group.
1382
+ # @param service_name [String] The name of the API Management service.
1383
+ # @param api_id [String] API revision identifier. Must be unique in the current
1384
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1385
+ # where n is the revision number.
1386
+ # @param operation_id [String] Operation identifier within an API. Must be
1387
+ # unique in the current API Management service instance.
1388
+ # @param filter [String] | Field | Supported operators | Supported
1389
+ # functions |
1390
+ # |-------------|------------------------|---------------------------------------------|
1391
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1392
+ # endswith |
1393
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1394
+ # endswith |
1395
+ # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1396
+ # endswith |
1397
+ # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1398
+ # endswith |
1399
+ # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
1400
+ # endswith |
1401
+ # @param top [Integer] Number of records to return.
1402
+ # @param skip [Integer] Number of records to skip.
1403
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1404
+ # to the HTTP request.
1405
+ #
1406
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1407
+ #
1408
+ def list_by_operation_async(resource_group_name, service_name, api_id, operation_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
1409
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1410
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1411
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1412
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1413
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1414
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
1415
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
1416
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
1417
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
1418
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
1419
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '80'" if !operation_id.nil? && operation_id.length > 80
1420
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1
1421
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !operation_id.nil? && operation_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1422
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
1423
+ fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0
1424
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1425
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1426
+
1427
+
1428
+ request_headers = {}
1429
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1430
+
1431
+ # Set Headers
1432
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1433
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1434
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags'
1435
+
1436
+ request_url = @base_url || @client.base_url
1437
+
1438
+ options = {
1439
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1440
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
1441
+ query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version},
1442
+ headers: request_headers.merge(custom_headers || {}),
1443
+ base_url: request_url
1444
+ }
1445
+ promise = @client.make_request_async(:get, path_template, options)
1446
+
1447
+ promise = promise.then do |result|
1448
+ http_response = result.response
1449
+ status_code = http_response.status
1450
+ response_content = http_response.body
1451
+ unless status_code == 200
1452
+ error_model = JSON.load(response_content)
1453
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1454
+ end
1455
+
1456
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1457
+ # Deserialize Response
1458
+ if status_code == 200
1459
+ begin
1460
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1461
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCollection.mapper()
1462
+ result.body = @client.deserialize(result_mapper, parsed_response)
1463
+ rescue Exception => e
1464
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1465
+ end
1466
+ end
1467
+
1468
+ result
1469
+ end
1470
+
1471
+ promise.execute
1472
+ end
1473
+
1474
+ #
1475
+ # Gets the entity state version of the tag specified by its identifier.
1476
+ #
1477
+ # @param resource_group_name [String] The name of the resource group.
1478
+ # @param service_name [String] The name of the API Management service.
1479
+ # @param api_id [String] API revision identifier. Must be unique in the current
1480
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1481
+ # where n is the revision number.
1482
+ # @param operation_id [String] Operation identifier within an API. Must be
1483
+ # unique in the current API Management service instance.
1484
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1485
+ # Management service instance.
1486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1487
+ # will be added to the HTTP request.
1488
+ #
1489
+ #
1490
+ def get_entity_state_by_operation(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:nil)
1491
+ response = get_entity_state_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:custom_headers).value!
1492
+ nil
1493
+ end
1494
+
1495
+ #
1496
+ # Gets the entity state version of the tag specified by its identifier.
1497
+ #
1498
+ # @param resource_group_name [String] The name of the resource group.
1499
+ # @param service_name [String] The name of the API Management service.
1500
+ # @param api_id [String] API revision identifier. Must be unique in the current
1501
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1502
+ # where n is the revision number.
1503
+ # @param operation_id [String] Operation identifier within an API. Must be
1504
+ # unique in the current API Management service instance.
1505
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1506
+ # Management service instance.
1507
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1508
+ # will be added to the HTTP request.
1509
+ #
1510
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1511
+ #
1512
+ def get_entity_state_by_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:nil)
1513
+ get_entity_state_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:custom_headers).value!
1514
+ end
1515
+
1516
+ #
1517
+ # Gets the entity state version of the tag specified by its identifier.
1518
+ #
1519
+ # @param resource_group_name [String] The name of the resource group.
1520
+ # @param service_name [String] The name of the API Management service.
1521
+ # @param api_id [String] API revision identifier. Must be unique in the current
1522
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1523
+ # where n is the revision number.
1524
+ # @param operation_id [String] Operation identifier within an API. Must be
1525
+ # unique in the current API Management service instance.
1526
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1527
+ # Management service instance.
1528
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1529
+ # to the HTTP request.
1530
+ #
1531
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1532
+ #
1533
+ def get_entity_state_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:nil)
1534
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1535
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1536
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1537
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1538
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1539
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
1540
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
1541
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
1542
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
1543
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
1544
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '80'" if !operation_id.nil? && operation_id.length > 80
1545
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1
1546
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !operation_id.nil? && operation_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1547
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
1548
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
1549
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
1550
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1551
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1552
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1553
+
1554
+
1555
+ request_headers = {}
1556
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1557
+
1558
+ # Set Headers
1559
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1560
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1561
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'
1562
+
1563
+ request_url = @base_url || @client.base_url
1564
+
1565
+ options = {
1566
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1567
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
1568
+ query_params: {'api-version' => @client.api_version},
1569
+ headers: request_headers.merge(custom_headers || {}),
1570
+ base_url: request_url
1571
+ }
1572
+ promise = @client.make_request_async(:head, path_template, options)
1573
+
1574
+ promise = promise.then do |result|
1575
+ http_response = result.response
1576
+ status_code = http_response.status
1577
+ response_content = http_response.body
1578
+ unless status_code == 200
1579
+ error_model = JSON.load(response_content)
1580
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1581
+ end
1582
+
1583
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1584
+
1585
+ result
1586
+ end
1587
+
1588
+ promise.execute
1589
+ end
1590
+
1591
+ #
1592
+ # Get tag associated with the Operation.
1593
+ #
1594
+ # @param resource_group_name [String] The name of the resource group.
1595
+ # @param service_name [String] The name of the API Management service.
1596
+ # @param api_id [String] API revision identifier. Must be unique in the current
1597
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1598
+ # where n is the revision number.
1599
+ # @param operation_id [String] Operation identifier within an API. Must be
1600
+ # unique in the current API Management service instance.
1601
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1602
+ # Management service instance.
1603
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1604
+ # will be added to the HTTP request.
1605
+ #
1606
+ # @return [TagContract] operation results.
1607
+ #
1608
+ def get_by_operation(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:nil)
1609
+ response = get_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:custom_headers).value!
1610
+ response.body unless response.nil?
1611
+ end
1612
+
1613
+ #
1614
+ # Get tag associated with the Operation.
1615
+ #
1616
+ # @param resource_group_name [String] The name of the resource group.
1617
+ # @param service_name [String] The name of the API Management service.
1618
+ # @param api_id [String] API revision identifier. Must be unique in the current
1619
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1620
+ # where n is the revision number.
1621
+ # @param operation_id [String] Operation identifier within an API. Must be
1622
+ # unique in the current API Management service instance.
1623
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1624
+ # Management service instance.
1625
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1626
+ # will be added to the HTTP request.
1627
+ #
1628
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1629
+ #
1630
+ def get_by_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:nil)
1631
+ get_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:custom_headers).value!
1632
+ end
1633
+
1634
+ #
1635
+ # Get tag associated with the Operation.
1636
+ #
1637
+ # @param resource_group_name [String] The name of the resource group.
1638
+ # @param service_name [String] The name of the API Management service.
1639
+ # @param api_id [String] API revision identifier. Must be unique in the current
1640
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1641
+ # where n is the revision number.
1642
+ # @param operation_id [String] Operation identifier within an API. Must be
1643
+ # unique in the current API Management service instance.
1644
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1645
+ # Management service instance.
1646
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1647
+ # to the HTTP request.
1648
+ #
1649
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1650
+ #
1651
+ def get_by_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, custom_headers:nil)
1652
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1653
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1654
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1655
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1656
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1657
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
1658
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
1659
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
1660
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
1661
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
1662
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '80'" if !operation_id.nil? && operation_id.length > 80
1663
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1
1664
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !operation_id.nil? && operation_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1665
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
1666
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
1667
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
1668
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1669
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1670
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1671
+
1672
+
1673
+ request_headers = {}
1674
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1675
+
1676
+ # Set Headers
1677
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1678
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1679
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'
1680
+
1681
+ request_url = @base_url || @client.base_url
1682
+
1683
+ options = {
1684
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1685
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
1686
+ query_params: {'api-version' => @client.api_version},
1687
+ headers: request_headers.merge(custom_headers || {}),
1688
+ base_url: request_url
1689
+ }
1690
+ promise = @client.make_request_async(:get, path_template, options)
1691
+
1692
+ promise = promise.then do |result|
1693
+ http_response = result.response
1694
+ status_code = http_response.status
1695
+ response_content = http_response.body
1696
+ unless status_code == 200
1697
+ error_model = JSON.load(response_content)
1698
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1699
+ end
1700
+
1701
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1702
+ # Deserialize Response
1703
+ if status_code == 200
1704
+ begin
1705
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1706
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
1707
+ result.body = @client.deserialize(result_mapper, parsed_response)
1708
+ rescue Exception => e
1709
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1710
+ end
1711
+ end
1712
+
1713
+ result
1714
+ end
1715
+
1716
+ promise.execute
1717
+ end
1718
+
1719
+ #
1720
+ # Assign tag to the Operation.
1721
+ #
1722
+ # @param resource_group_name [String] The name of the resource group.
1723
+ # @param service_name [String] The name of the API Management service.
1724
+ # @param api_id [String] API revision identifier. Must be unique in the current
1725
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1726
+ # where n is the revision number.
1727
+ # @param operation_id [String] Operation identifier within an API. Must be
1728
+ # unique in the current API Management service instance.
1729
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1730
+ # Management service instance.
1731
+ # @param if_match [String] ETag of the Entity. Not required when creating an
1732
+ # entity, but required when updating an entity.
1733
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1734
+ # will be added to the HTTP request.
1735
+ #
1736
+ # @return [TagContract] operation results.
1737
+ #
1738
+ def assign_to_operation(resource_group_name, service_name, api_id, operation_id, tag_id, if_match:nil, custom_headers:nil)
1739
+ response = assign_to_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match:if_match, custom_headers:custom_headers).value!
1740
+ response.body unless response.nil?
1741
+ end
1742
+
1743
+ #
1744
+ # Assign tag to the Operation.
1745
+ #
1746
+ # @param resource_group_name [String] The name of the resource group.
1747
+ # @param service_name [String] The name of the API Management service.
1748
+ # @param api_id [String] API revision identifier. Must be unique in the current
1749
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1750
+ # where n is the revision number.
1751
+ # @param operation_id [String] Operation identifier within an API. Must be
1752
+ # unique in the current API Management service instance.
1753
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1754
+ # Management service instance.
1755
+ # @param if_match [String] ETag of the Entity. Not required when creating an
1756
+ # entity, but required when updating an entity.
1757
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1758
+ # will be added to the HTTP request.
1759
+ #
1760
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1761
+ #
1762
+ def assign_to_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, tag_id, if_match:nil, custom_headers:nil)
1763
+ assign_to_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match:if_match, custom_headers:custom_headers).value!
1764
+ end
1765
+
1766
+ #
1767
+ # Assign tag to the Operation.
1768
+ #
1769
+ # @param resource_group_name [String] The name of the resource group.
1770
+ # @param service_name [String] The name of the API Management service.
1771
+ # @param api_id [String] API revision identifier. Must be unique in the current
1772
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1773
+ # where n is the revision number.
1774
+ # @param operation_id [String] Operation identifier within an API. Must be
1775
+ # unique in the current API Management service instance.
1776
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1777
+ # Management service instance.
1778
+ # @param if_match [String] ETag of the Entity. Not required when creating an
1779
+ # entity, but required when updating an entity.
1780
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1781
+ # to the HTTP request.
1782
+ #
1783
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1784
+ #
1785
+ def assign_to_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match:nil, custom_headers:nil)
1786
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1787
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1788
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1789
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1790
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1791
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
1792
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
1793
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
1794
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
1795
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
1796
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '80'" if !operation_id.nil? && operation_id.length > 80
1797
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1
1798
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !operation_id.nil? && operation_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1799
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
1800
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
1801
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
1802
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1803
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1804
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1805
+
1806
+
1807
+ request_headers = {}
1808
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1809
+
1810
+ # Set Headers
1811
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1812
+ request_headers['If-Match'] = if_match unless if_match.nil?
1813
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1814
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'
1815
+
1816
+ request_url = @base_url || @client.base_url
1817
+
1818
+ options = {
1819
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1820
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
1821
+ query_params: {'api-version' => @client.api_version},
1822
+ headers: request_headers.merge(custom_headers || {}),
1823
+ base_url: request_url
1824
+ }
1825
+ promise = @client.make_request_async(:put, path_template, options)
1826
+
1827
+ promise = promise.then do |result|
1828
+ http_response = result.response
1829
+ status_code = http_response.status
1830
+ response_content = http_response.body
1831
+ unless status_code == 201 || status_code == 200
1832
+ error_model = JSON.load(response_content)
1833
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1834
+ end
1835
+
1836
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1837
+ # Deserialize Response
1838
+ if status_code == 201
1839
+ begin
1840
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1841
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
1842
+ result.body = @client.deserialize(result_mapper, parsed_response)
1843
+ rescue Exception => e
1844
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1845
+ end
1846
+ end
1847
+ # Deserialize Response
1848
+ if status_code == 200
1849
+ begin
1850
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1851
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
1852
+ result.body = @client.deserialize(result_mapper, parsed_response)
1853
+ rescue Exception => e
1854
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1855
+ end
1856
+ end
1857
+
1858
+ result
1859
+ end
1860
+
1861
+ promise.execute
1862
+ end
1863
+
1864
+ #
1865
+ # Detach the tag from the Operation.
1866
+ #
1867
+ # @param resource_group_name [String] The name of the resource group.
1868
+ # @param service_name [String] The name of the API Management service.
1869
+ # @param api_id [String] API revision identifier. Must be unique in the current
1870
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1871
+ # where n is the revision number.
1872
+ # @param operation_id [String] Operation identifier within an API. Must be
1873
+ # unique in the current API Management service instance.
1874
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1875
+ # Management service instance.
1876
+ # @param if_match [String] ETag of the Entity. ETag should match the current
1877
+ # entity state from the header response of the GET request or it should be *
1878
+ # for unconditional update.
1879
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1880
+ # will be added to the HTTP request.
1881
+ #
1882
+ #
1883
+ def detach_from_operation(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers:nil)
1884
+ response = detach_from_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers:custom_headers).value!
1885
+ nil
1886
+ end
1887
+
1888
+ #
1889
+ # Detach the tag from the Operation.
1890
+ #
1891
+ # @param resource_group_name [String] The name of the resource group.
1892
+ # @param service_name [String] The name of the API Management service.
1893
+ # @param api_id [String] API revision identifier. Must be unique in the current
1894
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1895
+ # where n is the revision number.
1896
+ # @param operation_id [String] Operation identifier within an API. Must be
1897
+ # unique in the current API Management service instance.
1898
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1899
+ # Management service instance.
1900
+ # @param if_match [String] ETag of the Entity. ETag should match the current
1901
+ # entity state from the header response of the GET request or it should be *
1902
+ # for unconditional update.
1903
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1904
+ # will be added to the HTTP request.
1905
+ #
1906
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1907
+ #
1908
+ def detach_from_operation_with_http_info(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers:nil)
1909
+ detach_from_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers:custom_headers).value!
1910
+ end
1911
+
1912
+ #
1913
+ # Detach the tag from the Operation.
1914
+ #
1915
+ # @param resource_group_name [String] The name of the resource group.
1916
+ # @param service_name [String] The name of the API Management service.
1917
+ # @param api_id [String] API revision identifier. Must be unique in the current
1918
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
1919
+ # where n is the revision number.
1920
+ # @param operation_id [String] Operation identifier within an API. Must be
1921
+ # unique in the current API Management service instance.
1922
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
1923
+ # Management service instance.
1924
+ # @param if_match [String] ETag of the Entity. ETag should match the current
1925
+ # entity state from the header response of the GET request or it should be *
1926
+ # for unconditional update.
1927
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1928
+ # to the HTTP request.
1929
+ #
1930
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1931
+ #
1932
+ def detach_from_operation_async(resource_group_name, service_name, api_id, operation_id, tag_id, if_match, custom_headers:nil)
1933
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1934
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1935
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1936
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1937
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1938
+ fail ArgumentError, 'api_id is nil' if api_id.nil?
1939
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MaxLength': '256'" if !api_id.nil? && api_id.length > 256
1940
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'MinLength': '1'" if !api_id.nil? && api_id.length < 1
1941
+ fail ArgumentError, "'api_id' should satisfy the constraint - 'Pattern': '^[^*#&+:<>?]+$'" if !api_id.nil? && api_id.match(Regexp.new('^^[^*#&+:<>?]+$$')).nil?
1942
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
1943
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MaxLength': '80'" if !operation_id.nil? && operation_id.length > 80
1944
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'MinLength': '1'" if !operation_id.nil? && operation_id.length < 1
1945
+ fail ArgumentError, "'operation_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !operation_id.nil? && operation_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1946
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
1947
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
1948
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
1949
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
1950
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
1951
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1952
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1953
+
1954
+
1955
+ request_headers = {}
1956
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1957
+
1958
+ # Set Headers
1959
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1960
+ request_headers['If-Match'] = if_match unless if_match.nil?
1961
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1962
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}'
1963
+
1964
+ request_url = @base_url || @client.base_url
1965
+
1966
+ options = {
1967
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1968
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'apiId' => api_id,'operationId' => operation_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
1969
+ query_params: {'api-version' => @client.api_version},
1970
+ headers: request_headers.merge(custom_headers || {}),
1971
+ base_url: request_url
1972
+ }
1973
+ promise = @client.make_request_async(:delete, path_template, options)
1974
+
1975
+ promise = promise.then do |result|
1976
+ http_response = result.response
1977
+ status_code = http_response.status
1978
+ response_content = http_response.body
1979
+ unless status_code == 200 || status_code == 204
1980
+ error_model = JSON.load(response_content)
1981
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1982
+ end
1983
+
1984
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1985
+
1986
+ result
1987
+ end
1988
+
1989
+ promise.execute
1990
+ end
1991
+
1992
+ #
1993
+ # Lists all Tags associated with the Product.
1994
+ #
1995
+ # @param resource_group_name [String] The name of the resource group.
1996
+ # @param service_name [String] The name of the API Management service.
1997
+ # @param product_id [String] Product identifier. Must be unique in the current
1998
+ # API Management service instance.
1999
+ # @param filter [String] | Field | Supported operators | Supported
2000
+ # functions |
2001
+ # |-------------|------------------------|---------------------------------------------|
2002
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2003
+ # endswith |
2004
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2005
+ # endswith |
2006
+ # @param top [Integer] Number of records to return.
2007
+ # @param skip [Integer] Number of records to skip.
2008
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2009
+ # will be added to the HTTP request.
2010
+ #
2011
+ # @return [Array<TagContract>] operation results.
2012
+ #
2013
+ def list_by_product(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
2014
+ first_page = list_by_product_as_lazy(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers)
2015
+ first_page.get_all_items
2016
+ end
2017
+
2018
+ #
2019
+ # Lists all Tags associated with the Product.
2020
+ #
2021
+ # @param resource_group_name [String] The name of the resource group.
2022
+ # @param service_name [String] The name of the API Management service.
2023
+ # @param product_id [String] Product identifier. Must be unique in the current
2024
+ # API Management service instance.
2025
+ # @param filter [String] | Field | Supported operators | Supported
2026
+ # functions |
2027
+ # |-------------|------------------------|---------------------------------------------|
2028
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2029
+ # endswith |
2030
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2031
+ # endswith |
2032
+ # @param top [Integer] Number of records to return.
2033
+ # @param skip [Integer] Number of records to skip.
2034
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2035
+ # will be added to the HTTP request.
2036
+ #
2037
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2038
+ #
2039
+ def list_by_product_with_http_info(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
2040
+ list_by_product_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
2041
+ end
2042
+
2043
+ #
2044
+ # Lists all Tags associated with the Product.
2045
+ #
2046
+ # @param resource_group_name [String] The name of the resource group.
2047
+ # @param service_name [String] The name of the API Management service.
2048
+ # @param product_id [String] Product identifier. Must be unique in the current
2049
+ # API Management service instance.
2050
+ # @param filter [String] | Field | Supported operators | Supported
2051
+ # functions |
2052
+ # |-------------|------------------------|---------------------------------------------|
2053
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2054
+ # endswith |
2055
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2056
+ # endswith |
2057
+ # @param top [Integer] Number of records to return.
2058
+ # @param skip [Integer] Number of records to skip.
2059
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2060
+ # to the HTTP request.
2061
+ #
2062
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2063
+ #
2064
+ def list_by_product_async(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
2065
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2066
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
2067
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
2068
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
2069
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
2070
+ fail ArgumentError, 'product_id is nil' if product_id.nil?
2071
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '80'" if !product_id.nil? && product_id.length > 80
2072
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1
2073
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !product_id.nil? && product_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2074
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
2075
+ fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0
2076
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2077
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2078
+
2079
+
2080
+ request_headers = {}
2081
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2082
+
2083
+ # Set Headers
2084
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2085
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2086
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags'
2087
+
2088
+ request_url = @base_url || @client.base_url
2089
+
2090
+ options = {
2091
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2092
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'subscriptionId' => @client.subscription_id},
2093
+ query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'api-version' => @client.api_version},
2094
+ headers: request_headers.merge(custom_headers || {}),
2095
+ base_url: request_url
2096
+ }
2097
+ promise = @client.make_request_async(:get, path_template, options)
2098
+
2099
+ promise = promise.then do |result|
2100
+ http_response = result.response
2101
+ status_code = http_response.status
2102
+ response_content = http_response.body
2103
+ unless status_code == 200
2104
+ error_model = JSON.load(response_content)
2105
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2106
+ end
2107
+
2108
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2109
+ # Deserialize Response
2110
+ if status_code == 200
2111
+ begin
2112
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2113
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCollection.mapper()
2114
+ result.body = @client.deserialize(result_mapper, parsed_response)
2115
+ rescue Exception => e
2116
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2117
+ end
2118
+ end
2119
+
2120
+ result
2121
+ end
2122
+
2123
+ promise.execute
2124
+ end
2125
+
2126
+ #
2127
+ # Gets the entity state version of the tag specified by its identifier.
2128
+ #
2129
+ # @param resource_group_name [String] The name of the resource group.
2130
+ # @param service_name [String] The name of the API Management service.
2131
+ # @param product_id [String] Product identifier. Must be unique in the current
2132
+ # API Management service instance.
2133
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2134
+ # Management service instance.
2135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2136
+ # will be added to the HTTP request.
2137
+ #
2138
+ #
2139
+ def get_entity_state_by_product(resource_group_name, service_name, product_id, tag_id, custom_headers:nil)
2140
+ response = get_entity_state_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers:custom_headers).value!
2141
+ nil
2142
+ end
2143
+
2144
+ #
2145
+ # Gets the entity state version of the tag specified by its identifier.
2146
+ #
2147
+ # @param resource_group_name [String] The name of the resource group.
2148
+ # @param service_name [String] The name of the API Management service.
2149
+ # @param product_id [String] Product identifier. Must be unique in the current
2150
+ # API Management service instance.
2151
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2152
+ # Management service instance.
2153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2154
+ # will be added to the HTTP request.
2155
+ #
2156
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2157
+ #
2158
+ def get_entity_state_by_product_with_http_info(resource_group_name, service_name, product_id, tag_id, custom_headers:nil)
2159
+ get_entity_state_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers:custom_headers).value!
2160
+ end
2161
+
2162
+ #
2163
+ # Gets the entity state version of the tag specified by its identifier.
2164
+ #
2165
+ # @param resource_group_name [String] The name of the resource group.
2166
+ # @param service_name [String] The name of the API Management service.
2167
+ # @param product_id [String] Product identifier. Must be unique in the current
2168
+ # API Management service instance.
2169
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2170
+ # Management service instance.
2171
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2172
+ # to the HTTP request.
2173
+ #
2174
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2175
+ #
2176
+ def get_entity_state_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers:nil)
2177
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2178
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
2179
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
2180
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
2181
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
2182
+ fail ArgumentError, 'product_id is nil' if product_id.nil?
2183
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '80'" if !product_id.nil? && product_id.length > 80
2184
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1
2185
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !product_id.nil? && product_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2186
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
2187
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
2188
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
2189
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2190
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2191
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2192
+
2193
+
2194
+ request_headers = {}
2195
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2196
+
2197
+ # Set Headers
2198
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2199
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2200
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'
2201
+
2202
+ request_url = @base_url || @client.base_url
2203
+
2204
+ options = {
2205
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2206
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
2207
+ query_params: {'api-version' => @client.api_version},
2208
+ headers: request_headers.merge(custom_headers || {}),
2209
+ base_url: request_url
2210
+ }
2211
+ promise = @client.make_request_async(:head, path_template, options)
2212
+
2213
+ promise = promise.then do |result|
2214
+ http_response = result.response
2215
+ status_code = http_response.status
2216
+ response_content = http_response.body
2217
+ unless status_code == 200
2218
+ error_model = JSON.load(response_content)
2219
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2220
+ end
2221
+
2222
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2223
+
2224
+ result
2225
+ end
2226
+
2227
+ promise.execute
2228
+ end
2229
+
2230
+ #
2231
+ # Get tag associated with the Product.
2232
+ #
2233
+ # @param resource_group_name [String] The name of the resource group.
2234
+ # @param service_name [String] The name of the API Management service.
2235
+ # @param product_id [String] Product identifier. Must be unique in the current
2236
+ # API Management service instance.
2237
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2238
+ # Management service instance.
2239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2240
+ # will be added to the HTTP request.
2241
+ #
2242
+ # @return [TagContract] operation results.
2243
+ #
2244
+ def get_by_product(resource_group_name, service_name, product_id, tag_id, custom_headers:nil)
2245
+ response = get_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers:custom_headers).value!
2246
+ response.body unless response.nil?
2247
+ end
2248
+
2249
+ #
2250
+ # Get tag associated with the Product.
2251
+ #
2252
+ # @param resource_group_name [String] The name of the resource group.
2253
+ # @param service_name [String] The name of the API Management service.
2254
+ # @param product_id [String] Product identifier. Must be unique in the current
2255
+ # API Management service instance.
2256
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2257
+ # Management service instance.
2258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2259
+ # will be added to the HTTP request.
2260
+ #
2261
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2262
+ #
2263
+ def get_by_product_with_http_info(resource_group_name, service_name, product_id, tag_id, custom_headers:nil)
2264
+ get_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers:custom_headers).value!
2265
+ end
2266
+
2267
+ #
2268
+ # Get tag associated with the Product.
2269
+ #
2270
+ # @param resource_group_name [String] The name of the resource group.
2271
+ # @param service_name [String] The name of the API Management service.
2272
+ # @param product_id [String] Product identifier. Must be unique in the current
2273
+ # API Management service instance.
2274
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2275
+ # Management service instance.
2276
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2277
+ # to the HTTP request.
2278
+ #
2279
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2280
+ #
2281
+ def get_by_product_async(resource_group_name, service_name, product_id, tag_id, custom_headers:nil)
2282
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2283
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
2284
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
2285
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
2286
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
2287
+ fail ArgumentError, 'product_id is nil' if product_id.nil?
2288
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '80'" if !product_id.nil? && product_id.length > 80
2289
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1
2290
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !product_id.nil? && product_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2291
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
2292
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
2293
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
2294
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2295
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2296
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2297
+
2298
+
2299
+ request_headers = {}
2300
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2301
+
2302
+ # Set Headers
2303
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2304
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2305
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'
2306
+
2307
+ request_url = @base_url || @client.base_url
2308
+
2309
+ options = {
2310
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2311
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
2312
+ query_params: {'api-version' => @client.api_version},
2313
+ headers: request_headers.merge(custom_headers || {}),
2314
+ base_url: request_url
2315
+ }
2316
+ promise = @client.make_request_async(:get, path_template, options)
2317
+
2318
+ promise = promise.then do |result|
2319
+ http_response = result.response
2320
+ status_code = http_response.status
2321
+ response_content = http_response.body
2322
+ unless status_code == 200
2323
+ error_model = JSON.load(response_content)
2324
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2325
+ end
2326
+
2327
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2328
+ # Deserialize Response
2329
+ if status_code == 200
2330
+ begin
2331
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2332
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
2333
+ result.body = @client.deserialize(result_mapper, parsed_response)
2334
+ rescue Exception => e
2335
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2336
+ end
2337
+ end
2338
+
2339
+ result
2340
+ end
2341
+
2342
+ promise.execute
2343
+ end
2344
+
2345
+ #
2346
+ # Assign tag to the Product.
2347
+ #
2348
+ # @param resource_group_name [String] The name of the resource group.
2349
+ # @param service_name [String] The name of the API Management service.
2350
+ # @param product_id [String] Product identifier. Must be unique in the current
2351
+ # API Management service instance.
2352
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2353
+ # Management service instance.
2354
+ # @param if_match [String] ETag of the Entity. Not required when creating an
2355
+ # entity, but required when updating an entity.
2356
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2357
+ # will be added to the HTTP request.
2358
+ #
2359
+ # @return [TagContract] operation results.
2360
+ #
2361
+ def assign_to_product(resource_group_name, service_name, product_id, tag_id, if_match:nil, custom_headers:nil)
2362
+ response = assign_to_product_async(resource_group_name, service_name, product_id, tag_id, if_match:if_match, custom_headers:custom_headers).value!
2363
+ response.body unless response.nil?
2364
+ end
2365
+
2366
+ #
2367
+ # Assign tag to the Product.
2368
+ #
2369
+ # @param resource_group_name [String] The name of the resource group.
2370
+ # @param service_name [String] The name of the API Management service.
2371
+ # @param product_id [String] Product identifier. Must be unique in the current
2372
+ # API Management service instance.
2373
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2374
+ # Management service instance.
2375
+ # @param if_match [String] ETag of the Entity. Not required when creating an
2376
+ # entity, but required when updating an entity.
2377
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2378
+ # will be added to the HTTP request.
2379
+ #
2380
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2381
+ #
2382
+ def assign_to_product_with_http_info(resource_group_name, service_name, product_id, tag_id, if_match:nil, custom_headers:nil)
2383
+ assign_to_product_async(resource_group_name, service_name, product_id, tag_id, if_match:if_match, custom_headers:custom_headers).value!
2384
+ end
2385
+
2386
+ #
2387
+ # Assign tag to the Product.
2388
+ #
2389
+ # @param resource_group_name [String] The name of the resource group.
2390
+ # @param service_name [String] The name of the API Management service.
2391
+ # @param product_id [String] Product identifier. Must be unique in the current
2392
+ # API Management service instance.
2393
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2394
+ # Management service instance.
2395
+ # @param if_match [String] ETag of the Entity. Not required when creating an
2396
+ # entity, but required when updating an entity.
2397
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2398
+ # to the HTTP request.
2399
+ #
2400
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2401
+ #
2402
+ def assign_to_product_async(resource_group_name, service_name, product_id, tag_id, if_match:nil, custom_headers:nil)
2403
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2404
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
2405
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
2406
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
2407
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
2408
+ fail ArgumentError, 'product_id is nil' if product_id.nil?
2409
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '80'" if !product_id.nil? && product_id.length > 80
2410
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1
2411
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !product_id.nil? && product_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2412
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
2413
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
2414
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
2415
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2416
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2417
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2418
+
2419
+
2420
+ request_headers = {}
2421
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2422
+
2423
+ # Set Headers
2424
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2425
+ request_headers['If-Match'] = if_match unless if_match.nil?
2426
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2427
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'
2428
+
2429
+ request_url = @base_url || @client.base_url
2430
+
2431
+ options = {
2432
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2433
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
2434
+ query_params: {'api-version' => @client.api_version},
2435
+ headers: request_headers.merge(custom_headers || {}),
2436
+ base_url: request_url
2437
+ }
2438
+ promise = @client.make_request_async(:put, path_template, options)
2439
+
2440
+ promise = promise.then do |result|
2441
+ http_response = result.response
2442
+ status_code = http_response.status
2443
+ response_content = http_response.body
2444
+ unless status_code == 201 || status_code == 200
2445
+ error_model = JSON.load(response_content)
2446
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2447
+ end
2448
+
2449
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2450
+ # Deserialize Response
2451
+ if status_code == 201
2452
+ begin
2453
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2454
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
2455
+ result.body = @client.deserialize(result_mapper, parsed_response)
2456
+ rescue Exception => e
2457
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2458
+ end
2459
+ end
2460
+ # Deserialize Response
2461
+ if status_code == 200
2462
+ begin
2463
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2464
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagContract.mapper()
2465
+ result.body = @client.deserialize(result_mapper, parsed_response)
2466
+ rescue Exception => e
2467
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2468
+ end
2469
+ end
2470
+
2471
+ result
2472
+ end
2473
+
2474
+ promise.execute
2475
+ end
2476
+
2477
+ #
2478
+ # Detach the tag from the Product.
2479
+ #
2480
+ # @param resource_group_name [String] The name of the resource group.
2481
+ # @param service_name [String] The name of the API Management service.
2482
+ # @param product_id [String] Product identifier. Must be unique in the current
2483
+ # API Management service instance.
2484
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2485
+ # Management service instance.
2486
+ # @param if_match [String] ETag of the Entity. ETag should match the current
2487
+ # entity state from the header response of the GET request or it should be *
2488
+ # for unconditional update.
2489
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2490
+ # will be added to the HTTP request.
2491
+ #
2492
+ #
2493
+ def detach_from_product(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers:nil)
2494
+ response = detach_from_product_async(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers:custom_headers).value!
2495
+ nil
2496
+ end
2497
+
2498
+ #
2499
+ # Detach the tag from the Product.
2500
+ #
2501
+ # @param resource_group_name [String] The name of the resource group.
2502
+ # @param service_name [String] The name of the API Management service.
2503
+ # @param product_id [String] Product identifier. Must be unique in the current
2504
+ # API Management service instance.
2505
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2506
+ # Management service instance.
2507
+ # @param if_match [String] ETag of the Entity. ETag should match the current
2508
+ # entity state from the header response of the GET request or it should be *
2509
+ # for unconditional update.
2510
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2511
+ # will be added to the HTTP request.
2512
+ #
2513
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2514
+ #
2515
+ def detach_from_product_with_http_info(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers:nil)
2516
+ detach_from_product_async(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers:custom_headers).value!
2517
+ end
2518
+
2519
+ #
2520
+ # Detach the tag from the Product.
2521
+ #
2522
+ # @param resource_group_name [String] The name of the resource group.
2523
+ # @param service_name [String] The name of the API Management service.
2524
+ # @param product_id [String] Product identifier. Must be unique in the current
2525
+ # API Management service instance.
2526
+ # @param tag_id [String] Tag identifier. Must be unique in the current API
2527
+ # Management service instance.
2528
+ # @param if_match [String] ETag of the Entity. ETag should match the current
2529
+ # entity state from the header response of the GET request or it should be *
2530
+ # for unconditional update.
2531
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2532
+ # to the HTTP request.
2533
+ #
2534
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2535
+ #
2536
+ def detach_from_product_async(resource_group_name, service_name, product_id, tag_id, if_match, custom_headers:nil)
2537
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2538
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
2539
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
2540
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
2541
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
2542
+ fail ArgumentError, 'product_id is nil' if product_id.nil?
2543
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MaxLength': '80'" if !product_id.nil? && product_id.length > 80
2544
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'MinLength': '1'" if !product_id.nil? && product_id.length < 1
2545
+ fail ArgumentError, "'product_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !product_id.nil? && product_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2546
+ fail ArgumentError, 'tag_id is nil' if tag_id.nil?
2547
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MaxLength': '80'" if !tag_id.nil? && tag_id.length > 80
2548
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'MinLength': '1'" if !tag_id.nil? && tag_id.length < 1
2549
+ fail ArgumentError, "'tag_id' should satisfy the constraint - 'Pattern': '(^[\w]+$)|(^[\w][\w\-]+[\w]$)'" if !tag_id.nil? && tag_id.match(Regexp.new('^(^[\w]+$)|(^[\w][\w\-]+[\w]$)$')).nil?
2550
+ fail ArgumentError, 'if_match is nil' if if_match.nil?
2551
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2552
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2553
+
2554
+
2555
+ request_headers = {}
2556
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2557
+
2558
+ # Set Headers
2559
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2560
+ request_headers['If-Match'] = if_match unless if_match.nil?
2561
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2562
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}'
2563
+
2564
+ request_url = @base_url || @client.base_url
2565
+
2566
+ options = {
2567
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2568
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'productId' => product_id,'tagId' => tag_id,'subscriptionId' => @client.subscription_id},
2569
+ query_params: {'api-version' => @client.api_version},
2570
+ headers: request_headers.merge(custom_headers || {}),
2571
+ base_url: request_url
2572
+ }
2573
+ promise = @client.make_request_async(:delete, path_template, options)
2574
+
2575
+ promise = promise.then do |result|
2576
+ http_response = result.response
2577
+ status_code = http_response.status
2578
+ response_content = http_response.body
2579
+ unless status_code == 200 || status_code == 204
2580
+ error_model = JSON.load(response_content)
2581
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2582
+ end
2583
+
2584
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2585
+
2586
+ result
2587
+ end
2588
+
2589
+ promise.execute
2590
+ end
2591
+
2592
+ #
2593
+ # Lists a collection of tags defined within a service instance.
2594
+ #
2595
+ # @param next_page_link [String] The NextLink from the previous successful call
2596
+ # to List operation.
2597
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2598
+ # will be added to the HTTP request.
2599
+ #
2600
+ # @return [TagCollection] operation results.
2601
+ #
2602
+ def list_by_service_next(next_page_link, custom_headers:nil)
2603
+ response = list_by_service_next_async(next_page_link, custom_headers:custom_headers).value!
2604
+ response.body unless response.nil?
2605
+ end
2606
+
2607
+ #
2608
+ # Lists a collection of tags defined within a service instance.
2609
+ #
2610
+ # @param next_page_link [String] The NextLink from the previous successful call
2611
+ # to List operation.
2612
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2613
+ # will be added to the HTTP request.
2614
+ #
2615
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2616
+ #
2617
+ def list_by_service_next_with_http_info(next_page_link, custom_headers:nil)
2618
+ list_by_service_next_async(next_page_link, custom_headers:custom_headers).value!
2619
+ end
2620
+
2621
+ #
2622
+ # Lists a collection of tags defined within a service instance.
2623
+ #
2624
+ # @param next_page_link [String] The NextLink from the previous successful call
2625
+ # to List operation.
2626
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2627
+ # to the HTTP request.
2628
+ #
2629
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2630
+ #
2631
+ def list_by_service_next_async(next_page_link, custom_headers:nil)
2632
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2633
+
2634
+
2635
+ request_headers = {}
2636
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2637
+
2638
+ # Set Headers
2639
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2640
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2641
+ path_template = '{nextLink}'
2642
+
2643
+ request_url = @base_url || @client.base_url
2644
+
2645
+ options = {
2646
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2647
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2648
+ headers: request_headers.merge(custom_headers || {}),
2649
+ base_url: request_url
2650
+ }
2651
+ promise = @client.make_request_async(:get, path_template, options)
2652
+
2653
+ promise = promise.then do |result|
2654
+ http_response = result.response
2655
+ status_code = http_response.status
2656
+ response_content = http_response.body
2657
+ unless status_code == 200
2658
+ error_model = JSON.load(response_content)
2659
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2660
+ end
2661
+
2662
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2663
+ # Deserialize Response
2664
+ if status_code == 200
2665
+ begin
2666
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2667
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCollection.mapper()
2668
+ result.body = @client.deserialize(result_mapper, parsed_response)
2669
+ rescue Exception => e
2670
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2671
+ end
2672
+ end
2673
+
2674
+ result
2675
+ end
2676
+
2677
+ promise.execute
2678
+ end
2679
+
2680
+ #
2681
+ # Lists all Tags associated with the API.
2682
+ #
2683
+ # @param next_page_link [String] The NextLink from the previous successful call
2684
+ # to List operation.
2685
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2686
+ # will be added to the HTTP request.
2687
+ #
2688
+ # @return [TagCollection] operation results.
2689
+ #
2690
+ def list_by_api_next(next_page_link, custom_headers:nil)
2691
+ response = list_by_api_next_async(next_page_link, custom_headers:custom_headers).value!
2692
+ response.body unless response.nil?
2693
+ end
2694
+
2695
+ #
2696
+ # Lists all Tags associated with the API.
2697
+ #
2698
+ # @param next_page_link [String] The NextLink from the previous successful call
2699
+ # to List operation.
2700
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2701
+ # will be added to the HTTP request.
2702
+ #
2703
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2704
+ #
2705
+ def list_by_api_next_with_http_info(next_page_link, custom_headers:nil)
2706
+ list_by_api_next_async(next_page_link, custom_headers:custom_headers).value!
2707
+ end
2708
+
2709
+ #
2710
+ # Lists all Tags associated with the API.
2711
+ #
2712
+ # @param next_page_link [String] The NextLink from the previous successful call
2713
+ # to List operation.
2714
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2715
+ # to the HTTP request.
2716
+ #
2717
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2718
+ #
2719
+ def list_by_api_next_async(next_page_link, custom_headers:nil)
2720
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2721
+
2722
+
2723
+ request_headers = {}
2724
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2725
+
2726
+ # Set Headers
2727
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2728
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2729
+ path_template = '{nextLink}'
2730
+
2731
+ request_url = @base_url || @client.base_url
2732
+
2733
+ options = {
2734
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2735
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2736
+ headers: request_headers.merge(custom_headers || {}),
2737
+ base_url: request_url
2738
+ }
2739
+ promise = @client.make_request_async(:get, path_template, options)
2740
+
2741
+ promise = promise.then do |result|
2742
+ http_response = result.response
2743
+ status_code = http_response.status
2744
+ response_content = http_response.body
2745
+ unless status_code == 200
2746
+ error_model = JSON.load(response_content)
2747
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2748
+ end
2749
+
2750
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2751
+ # Deserialize Response
2752
+ if status_code == 200
2753
+ begin
2754
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2755
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCollection.mapper()
2756
+ result.body = @client.deserialize(result_mapper, parsed_response)
2757
+ rescue Exception => e
2758
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2759
+ end
2760
+ end
2761
+
2762
+ result
2763
+ end
2764
+
2765
+ promise.execute
2766
+ end
2767
+
2768
+ #
2769
+ # Lists all Tags associated with the Operation.
2770
+ #
2771
+ # @param next_page_link [String] The NextLink from the previous successful call
2772
+ # to List operation.
2773
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2774
+ # will be added to the HTTP request.
2775
+ #
2776
+ # @return [TagCollection] operation results.
2777
+ #
2778
+ def list_by_operation_next(next_page_link, custom_headers:nil)
2779
+ response = list_by_operation_next_async(next_page_link, custom_headers:custom_headers).value!
2780
+ response.body unless response.nil?
2781
+ end
2782
+
2783
+ #
2784
+ # Lists all Tags associated with the Operation.
2785
+ #
2786
+ # @param next_page_link [String] The NextLink from the previous successful call
2787
+ # to List operation.
2788
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2789
+ # will be added to the HTTP request.
2790
+ #
2791
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2792
+ #
2793
+ def list_by_operation_next_with_http_info(next_page_link, custom_headers:nil)
2794
+ list_by_operation_next_async(next_page_link, custom_headers:custom_headers).value!
2795
+ end
2796
+
2797
+ #
2798
+ # Lists all Tags associated with the Operation.
2799
+ #
2800
+ # @param next_page_link [String] The NextLink from the previous successful call
2801
+ # to List operation.
2802
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2803
+ # to the HTTP request.
2804
+ #
2805
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2806
+ #
2807
+ def list_by_operation_next_async(next_page_link, custom_headers:nil)
2808
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2809
+
2810
+
2811
+ request_headers = {}
2812
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2813
+
2814
+ # Set Headers
2815
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2816
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2817
+ path_template = '{nextLink}'
2818
+
2819
+ request_url = @base_url || @client.base_url
2820
+
2821
+ options = {
2822
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2823
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2824
+ headers: request_headers.merge(custom_headers || {}),
2825
+ base_url: request_url
2826
+ }
2827
+ promise = @client.make_request_async(:get, path_template, options)
2828
+
2829
+ promise = promise.then do |result|
2830
+ http_response = result.response
2831
+ status_code = http_response.status
2832
+ response_content = http_response.body
2833
+ unless status_code == 200
2834
+ error_model = JSON.load(response_content)
2835
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2836
+ end
2837
+
2838
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2839
+ # Deserialize Response
2840
+ if status_code == 200
2841
+ begin
2842
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2843
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCollection.mapper()
2844
+ result.body = @client.deserialize(result_mapper, parsed_response)
2845
+ rescue Exception => e
2846
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2847
+ end
2848
+ end
2849
+
2850
+ result
2851
+ end
2852
+
2853
+ promise.execute
2854
+ end
2855
+
2856
+ #
2857
+ # Lists all Tags associated with the Product.
2858
+ #
2859
+ # @param next_page_link [String] The NextLink from the previous successful call
2860
+ # to List operation.
2861
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2862
+ # will be added to the HTTP request.
2863
+ #
2864
+ # @return [TagCollection] operation results.
2865
+ #
2866
+ def list_by_product_next(next_page_link, custom_headers:nil)
2867
+ response = list_by_product_next_async(next_page_link, custom_headers:custom_headers).value!
2868
+ response.body unless response.nil?
2869
+ end
2870
+
2871
+ #
2872
+ # Lists all Tags associated with the Product.
2873
+ #
2874
+ # @param next_page_link [String] The NextLink from the previous successful call
2875
+ # to List operation.
2876
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2877
+ # will be added to the HTTP request.
2878
+ #
2879
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2880
+ #
2881
+ def list_by_product_next_with_http_info(next_page_link, custom_headers:nil)
2882
+ list_by_product_next_async(next_page_link, custom_headers:custom_headers).value!
2883
+ end
2884
+
2885
+ #
2886
+ # Lists all Tags associated with the Product.
2887
+ #
2888
+ # @param next_page_link [String] The NextLink from the previous successful call
2889
+ # to List operation.
2890
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2891
+ # to the HTTP request.
2892
+ #
2893
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2894
+ #
2895
+ def list_by_product_next_async(next_page_link, custom_headers:nil)
2896
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2897
+
2898
+
2899
+ request_headers = {}
2900
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2901
+
2902
+ # Set Headers
2903
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2904
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2905
+ path_template = '{nextLink}'
2906
+
2907
+ request_url = @base_url || @client.base_url
2908
+
2909
+ options = {
2910
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2911
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2912
+ headers: request_headers.merge(custom_headers || {}),
2913
+ base_url: request_url
2914
+ }
2915
+ promise = @client.make_request_async(:get, path_template, options)
2916
+
2917
+ promise = promise.then do |result|
2918
+ http_response = result.response
2919
+ status_code = http_response.status
2920
+ response_content = http_response.body
2921
+ unless status_code == 200
2922
+ error_model = JSON.load(response_content)
2923
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2924
+ end
2925
+
2926
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2927
+ # Deserialize Response
2928
+ if status_code == 200
2929
+ begin
2930
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2931
+ result_mapper = Azure::ApiManagement::Mgmt::V2018_01_01::Models::TagCollection.mapper()
2932
+ result.body = @client.deserialize(result_mapper, parsed_response)
2933
+ rescue Exception => e
2934
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2935
+ end
2936
+ end
2937
+
2938
+ result
2939
+ end
2940
+
2941
+ promise.execute
2942
+ end
2943
+
2944
+ #
2945
+ # Lists a collection of tags defined within a service instance.
2946
+ #
2947
+ # @param resource_group_name [String] The name of the resource group.
2948
+ # @param service_name [String] The name of the API Management service.
2949
+ # @param filter [String] | Field | Supported operators | Supported
2950
+ # functions |
2951
+ # |-------------|------------------------|---------------------------------------------|
2952
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2953
+ # endswith |
2954
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2955
+ # endswith |
2956
+ # @param top [Integer] Number of records to return.
2957
+ # @param skip [Integer] Number of records to skip.
2958
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2959
+ # will be added to the HTTP request.
2960
+ #
2961
+ # @return [TagCollection] which provide lazy access to pages of the response.
2962
+ #
2963
+ def list_by_service_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil)
2964
+ response = list_by_service_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
2965
+ unless response.nil?
2966
+ page = response.body
2967
+ page.next_method = Proc.new do |next_page_link|
2968
+ list_by_service_next_async(next_page_link, custom_headers:custom_headers)
2969
+ end
2970
+ page
2971
+ end
2972
+ end
2973
+
2974
+ #
2975
+ # Lists all Tags associated with the API.
2976
+ #
2977
+ # @param resource_group_name [String] The name of the resource group.
2978
+ # @param service_name [String] The name of the API Management service.
2979
+ # @param api_id [String] API revision identifier. Must be unique in the current
2980
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
2981
+ # where n is the revision number.
2982
+ # @param filter [String] | Field | Supported operators | Supported
2983
+ # functions |
2984
+ # |-------------|------------------------|---------------------------------------------|
2985
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2986
+ # endswith |
2987
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
2988
+ # endswith |
2989
+ # @param top [Integer] Number of records to return.
2990
+ # @param skip [Integer] Number of records to skip.
2991
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2992
+ # will be added to the HTTP request.
2993
+ #
2994
+ # @return [TagCollection] which provide lazy access to pages of the response.
2995
+ #
2996
+ def list_by_api_as_lazy(resource_group_name, service_name, api_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
2997
+ response = list_by_api_async(resource_group_name, service_name, api_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
2998
+ unless response.nil?
2999
+ page = response.body
3000
+ page.next_method = Proc.new do |next_page_link|
3001
+ list_by_api_next_async(next_page_link, custom_headers:custom_headers)
3002
+ end
3003
+ page
3004
+ end
3005
+ end
3006
+
3007
+ #
3008
+ # Lists all Tags associated with the Operation.
3009
+ #
3010
+ # @param resource_group_name [String] The name of the resource group.
3011
+ # @param service_name [String] The name of the API Management service.
3012
+ # @param api_id [String] API revision identifier. Must be unique in the current
3013
+ # API Management service instance. Non-current revision has ;rev=n as a suffix
3014
+ # where n is the revision number.
3015
+ # @param operation_id [String] Operation identifier within an API. Must be
3016
+ # unique in the current API Management service instance.
3017
+ # @param filter [String] | Field | Supported operators | Supported
3018
+ # functions |
3019
+ # |-------------|------------------------|---------------------------------------------|
3020
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
3021
+ # endswith |
3022
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
3023
+ # endswith |
3024
+ # | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
3025
+ # endswith |
3026
+ # | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
3027
+ # endswith |
3028
+ # | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
3029
+ # endswith |
3030
+ # @param top [Integer] Number of records to return.
3031
+ # @param skip [Integer] Number of records to skip.
3032
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3033
+ # will be added to the HTTP request.
3034
+ #
3035
+ # @return [TagCollection] which provide lazy access to pages of the response.
3036
+ #
3037
+ def list_by_operation_as_lazy(resource_group_name, service_name, api_id, operation_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
3038
+ response = list_by_operation_async(resource_group_name, service_name, api_id, operation_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
3039
+ unless response.nil?
3040
+ page = response.body
3041
+ page.next_method = Proc.new do |next_page_link|
3042
+ list_by_operation_next_async(next_page_link, custom_headers:custom_headers)
3043
+ end
3044
+ page
3045
+ end
3046
+ end
3047
+
3048
+ #
3049
+ # Lists all Tags associated with the Product.
3050
+ #
3051
+ # @param resource_group_name [String] The name of the resource group.
3052
+ # @param service_name [String] The name of the API Management service.
3053
+ # @param product_id [String] Product identifier. Must be unique in the current
3054
+ # API Management service instance.
3055
+ # @param filter [String] | Field | Supported operators | Supported
3056
+ # functions |
3057
+ # |-------------|------------------------|---------------------------------------------|
3058
+ # | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
3059
+ # endswith |
3060
+ # | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith,
3061
+ # endswith |
3062
+ # @param top [Integer] Number of records to return.
3063
+ # @param skip [Integer] Number of records to skip.
3064
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3065
+ # will be added to the HTTP request.
3066
+ #
3067
+ # @return [TagCollection] which provide lazy access to pages of the response.
3068
+ #
3069
+ def list_by_product_as_lazy(resource_group_name, service_name, product_id, filter:nil, top:nil, skip:nil, custom_headers:nil)
3070
+ response = list_by_product_async(resource_group_name, service_name, product_id, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value!
3071
+ unless response.nil?
3072
+ page = response.body
3073
+ page.next_method = Proc.new do |next_page_link|
3074
+ list_by_product_next_async(next_page_link, custom_headers:custom_headers)
3075
+ end
3076
+ page
3077
+ end
3078
+ end
3079
+
3080
+ end
3081
+ end