azure_mgmt_api_management 0.17.0 → 0.18.0

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