azure_mgmt_api_management 0.18.2 → 0.18.3

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